Skip to content

Commit

Permalink
Simplify CodePageOfDocument() to match SCI_GETCODEPAGE, the later is …
Browse files Browse the repository at this point in the history
…used throughout Notepad2.
  • Loading branch information
zufuliu committed Mar 2, 2021
1 parent 4b16e64 commit 5fb5338
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scintilla/win32/ScintillaWin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,8 @@ UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage) noexcept {
}

UINT ScintillaWin::CodePageOfDocument() const noexcept {
return CodePageFromCharSet(vs.styles[STYLE_DEFAULT].characterSet, pdoc->dbcsCodePage);
return pdoc->dbcsCodePage; // see SCI_GETCODEPAGE in Editor.cxx
//return CodePageFromCharSet(vs.styles[STYLE_DEFAULT].characterSet, pdoc->dbcsCodePage);
}

std::string ScintillaWin::EncodeWString(std::wstring_view wsv) {
Expand Down

0 comments on commit 5fb5338

Please sign in to comment.