aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-04-10 09:32:30 +1000
committerNeil <nyamatongwe@gmail.com>2020-04-10 09:32:30 +1000
commitb68733559771e8b8b5d322de54ea4c3bb1c37758 (patch)
tree3308953b05b2a64ecfa3b8d68ac44fc4d686712b
parentb726baf8b1b7e5316ab06c05ace1c08c13e01c61 (diff)
downloadscintilla-mirror-b68733559771e8b8b5d322de54ea4c3bb1c37758.tar.gz
Backport: Bug [#2168]. Fix bug where 'µ' (Micro Sign) case-insensitively matches '?'.
Backport of changeset 8134:b28166a7c77b.
-rw-r--r--doc/ScintillaHistory.html8
-rw-r--r--qt/ScintillaEditBase/ScintillaQt.cpp8
2 files changed, 13 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 28378b6e2..24e0b4173 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -604,6 +604,14 @@
<a href="https://sourceforge.net/p/scintilla/bugs/2167/">Bug #2167</a>.
</li>
<li>
+ On Qt with default encoding (ISO 8859-1) fix bug where 'µ' (Micro Sign) case-insensitively matches '?'
+ <a href="https://sourceforge.net/p/scintilla/bugs/2168/">Bug #2168</a>.
+ </li>
+ <li>
+ On GTK with Wayland fix display of windowed IME.
+ <a href="https://sourceforge.net/p/scintilla/bugs/2149/">Bug #2149</a>.
+ </li>
+ <li>
Don't clear clipboard before copying text with Qt.
<a href="https://sourceforge.net/p/scintilla/bugs/2147/">Bug #2147</a>.
</li>
diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp
index 4236c7f86..3c62ec7fd 100644
--- a/qt/ScintillaEditBase/ScintillaQt.cpp
+++ b/qt/ScintillaEditBase/ScintillaQt.cpp
@@ -575,9 +575,11 @@ CaseFolder *ScintillaQt::CaseFolderForEncoding()
sCharacter[0] = i;
QString su = codec->toUnicode(sCharacter, 1);
QString suFolded = su.toCaseFolded();
- QByteArray bytesFolded = codec->fromUnicode(suFolded);
- if (bytesFolded.length() == 1) {
- pcf->SetTranslation(sCharacter[0], bytesFolded[0]);
+ if (codec->canEncode(suFolded)) {
+ QByteArray bytesFolded = codec->fromUnicode(suFolded);
+ if (bytesFolded.length() == 1) {
+ pcf->SetTranslation(sCharacter[0], bytesFolded[0]);
+ }
}
}
return pcf;