Fix Cyrillic, Turkish and other languages input issue in ANSI mode.

For more information, check:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5671

Fix #5671
This commit is contained in:
Don HO 2019-06-11 08:38:35 +02:00
parent 344850aedb
commit cc2d246ae2
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -1187,7 +1187,13 @@ UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage) {
}
switch (characterSet) {
case SC_CHARSET_ANSI: return 1252;
case SC_CHARSET_DEFAULT: return documentCodePage ? documentCodePage : 1252;
// Cyrillic / Turkish or other languages cannot be shown in ANSI mode.
// This fixes such problem. For more information about this fix, check:
// https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5671
//case SC_CHARSET_DEFAULT: return documentCodePage ? documentCodePage : 1252;
case SC_CHARSET_DEFAULT: return documentCodePage;
case SC_CHARSET_BALTIC: return 1257;
case SC_CHARSET_CHINESEBIG5: return 950;
case SC_CHARSET_EASTEUROPE: return 1250;