diff options
-rw-r--r-- | doc/ScintillaDoc.html | 68 | ||||
-rw-r--r-- | doc/ScintillaHistory.html | 6 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 2 |
3 files changed, 62 insertions, 14 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 6e94e52e3..36eb6ad15 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -2723,24 +2723,66 @@ struct Sci_TextToFind { <code>SCI_STYLESETCHARACTERSET(SCE_C_STRING, SC_CHARSET_RUSSIAN)</code> would ensure that strings in Russian would display correctly in C and C++ (<code>SCE_C_STRING</code> is the style number used by the C and C++ lexer to display literal strings; it has the value 6). This - feature works differently on Windows and GTK+.</p> + feature works differently on Windows and GTK+.<br /> + The default character set is <code>SC_CHARSET_DEFAULT</code>.</p> <p>The character sets supported on Windows are:<br /> - <code>SC_CHARSET_ANSI</code>, <code>SC_CHARSET_ARABIC</code>, <code>SC_CHARSET_BALTIC</code>, - <code>SC_CHARSET_CHINESEBIG5</code>, <code>SC_CHARSET_DEFAULT</code>, - <code>SC_CHARSET_EASTEUROPE</code>, <code>SC_CHARSET_GB2312</code>, - <code>SC_CHARSET_GREEK</code>, <code>SC_CHARSET_HANGUL</code>, <code>SC_CHARSET_HEBREW</code>, - <code>SC_CHARSET_JOHAB</code>, <code>SC_CHARSET_MAC</code>, <code>SC_CHARSET_OEM</code>, - <code>SC_CHARSET_RUSSIAN</code> (code page 1251), - <code>SC_CHARSET_SHIFTJIS</code>, <code>SC_CHARSET_SYMBOL</code>, <code>SC_CHARSET_THAI</code>, - <code>SC_CHARSET_TURKISH</code>, and <code>SC_CHARSET_VIETNAMESE</code>.</p> + <code>SC_CHARSET_ANSI</code>, + <code>SC_CHARSET_ARABIC</code>, + <code>SC_CHARSET_BALTIC</code>, + <code>SC_CHARSET_CHINESEBIG5</code>, + <code>SC_CHARSET_DEFAULT</code>, + <code>SC_CHARSET_EASTEUROPE</code>, + <code>SC_CHARSET_GB2312</code>, + <code>SC_CHARSET_GREEK</code>, + <code>SC_CHARSET_HANGUL</code>, + <code>SC_CHARSET_HEBREW</code>, + <code>SC_CHARSET_JOHAB</code>, + <code>SC_CHARSET_MAC</code>, + <code>SC_CHARSET_OEM</code>, + <code>SC_CHARSET_RUSSIAN</code> (code page 1251), + <code>SC_CHARSET_SHIFTJIS</code>, + <code>SC_CHARSET_SYMBOL</code>, + <code>SC_CHARSET_THAI</code>, + <code>SC_CHARSET_TURKISH</code>, and + <code>SC_CHARSET_VIETNAMESE</code>.<br /> + <code>SC_CHARSET_ANSI</code> and <code>SC_CHARSET_DEFAULT</code> specify European Windows + code page 1252 unless the code page is set.</p> <p>The character sets supported on GTK+ are:<br /> - <code>SC_CHARSET_ANSI</code>, <code>SC_CHARSET_OEM866</code> (code page 866), <code>SC_CHARSET_CYRILLIC</code> (code page 1251), + <code>SC_CHARSET_ANSI</code>, + <code>SC_CHARSET_DEFAULT</code> (8859-1), + <code>SC_CHARSET_OEM866</code> (code page 866), + <code>SC_CHARSET_CYRILLIC</code> (code page 1251), + <code>SC_CHARSET_EASTEUROPE</code>, + <code>SC_CHARSET_GB2312</code>, + <code>SC_CHARSET_HANGUL</code>, + <code>SC_CHARSET_RUSSIAN</code> (KOI8-R), + <code>SC_CHARSET_SHIFTJIS</code>, and + <code>SC_CHARSET_8859_15</code>.</p> + + <p>The character sets supported on Cocoa are:<br /> + <code>SC_CHARSET_8859_15</code>, + <code>SC_CHARSET_ANSI</code> (8859-1), + <code>SC_CHARSET_ARABIC</code>, + <code>SC_CHARSET_BALTIC</code>, + <code>SC_CHARSET_CHINESEBIG5</code>, + <code>SC_CHARSET_CYRILLIC</code> (code page 1251), + <code>SC_CHARSET_DEFAULT</code> (8859-1), <code>SC_CHARSET_EASTEUROPE</code>, - <code>SC_CHARSET_GB2312</code>, <code>SC_CHARSET_HANGUL</code>, - <code>SC_CHARSET_RUSSIAN</code> (KOI8-R), <code>SC_CHARSET_SHIFTJIS</code>, and - <code>SC_CHARSET_8859_15</code>.</p> + <code>SC_CHARSET_GB2312</code>, + <code>SC_CHARSET_GREEK</code>, + <code>SC_CHARSET_HANGUL</code>, + <code>SC_CHARSET_HEBREW</code>, + <code>SC_CHARSET_JOHAB</code>, + <code>SC_CHARSET_MAC</code>, + <code>SC_CHARSET_OEM</code>, + <code>SC_CHARSET_RUSSIAN</code> (code page 1251), + <code>SC_CHARSET_SHIFTJIS</code>, + <code>SC_CHARSET_SYMBOL</code>, + <code>SC_CHARSET_THAI</code>, + <code>SC_CHARSET_TURKISH</code>, + <code>SC_CHARSET_VIETNAMESE</code>.</p> <p><b id="SCI_STYLESETCASE">SCI_STYLESETCASE(int styleNumber, int caseMode)</b><br /> <b id="SCI_STYLEGETCASE">SCI_STYLEGETCASE(int styleNumber)</b><br /> diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 1ebddebc5..64197c744 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -520,6 +520,12 @@ <a href="http://sourceforge.net/p/scintilla/bugs/1648/">Bug #1648</a>. </li> <li> + SC_CHARSET_DEFAULT now means code page 1252 on Windows unless a code page is set. + This prevents unexpected behaviour and crashes on East Asian systems where default locales are commonly DBCS. + Projects which want to default to DBCS code pages in East Asian locales should set the code page and + character set explicitly. + </li> + <li> The HTML lexer no longer treats "<?" inside a string in a script as potentially starting an XML document. <a href="http://sourceforge.net/p/scintilla/bugs/767/">Bug #767</a>. </li> diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 3ed249ca0..10d119b5a 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1145,7 +1145,7 @@ UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage) { } switch (characterSet) { case SC_CHARSET_ANSI: return 1252; - case SC_CHARSET_DEFAULT: return documentCodePage; + case SC_CHARSET_DEFAULT: return documentCodePage ? documentCodePage : 1252; case SC_CHARSET_BALTIC: return 1257; case SC_CHARSET_CHINESEBIG5: return 950; case SC_CHARSET_EASTEUROPE: return 1250; |