diff options
author | Neil <nyamatongwe@gmail.com> | 2020-04-10 09:32:30 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-04-10 09:32:30 +1000 |
commit | b68733559771e8b8b5d322de54ea4c3bb1c37758 (patch) | |
tree | 3308953b05b2a64ecfa3b8d68ac44fc4d686712b /qt/ScintillaEditBase/ScintillaQt.cpp | |
parent | b726baf8b1b7e5316ab06c05ace1c08c13e01c61 (diff) | |
download | scintilla-mirror-b68733559771e8b8b5d322de54ea4c3bb1c37758.tar.gz |
Backport: Bug [#2168]. Fix bug where 'ยต' (Micro Sign) case-insensitively matches '?'.
Backport of changeset 8134:b28166a7c77b.
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaQt.cpp')
-rw-r--r-- | qt/ScintillaEditBase/ScintillaQt.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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; |