Skip to content

Commit

Permalink
Fix regression for using ANSI code pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Apr 5, 2019
1 parent 351f34c commit 0dbd3b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scintilla/win32/ScintillaWin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1315,12 +1315,15 @@ unsigned int SciMessageFromEM(unsigned int iMessage) noexcept {
namespace Scintilla {

UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage) noexcept {
// UTF-8 and DBCS ANSI code pages
if (documentCodePage) {
return documentCodePage;
}
// SBCS code pages: zero / CP_ACP
switch (characterSet) {
case SC_CHARSET_ANSI: return 1252;
case SC_CHARSET_DEFAULT: return documentCodePage ? documentCodePage : 1252;
//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;
Expand Down

0 comments on commit 0dbd3b4

Please sign in to comment.