From cc2d246ae23bc85fdccb5797a03fc08e512bec48 Mon Sep 17 00:00:00 2001 From: Don HO Date: Tue, 11 Jun 2019 08:38:35 +0200 Subject: [PATCH] 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 --- scintilla/win32/ScintillaWin.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx index 30081bf5..bf196f51 100644 --- a/scintilla/win32/ScintillaWin.cxx +++ b/scintilla/win32/ScintillaWin.cxx @@ -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;