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 | d534bb0dc4c64fdab5145c7838c46fa61fb25574 (patch) | |
| tree | 0e80f6fe86304ceead28ddb2ceac48d8fbe6ea00 /qt/ScintillaEditBase/ScintillaQt.cpp | |
| parent | fc79966496fc5efd7f5bb0ea4b5aa394abe1e363 (diff) | |
| download | scintilla-mirror-d534bb0dc4c64fdab5145c7838c46fa61fb25574.tar.gz | |
Bug [#2168]. Fix bug where 'ยต' (Micro Sign) case-insensitively matches '?'.
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; | 
