diff options
Diffstat (limited to 'qt')
| -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; | 
