From ad41ebb7b2cdcada7b6afed29ddee17690bd5c97 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 5 Aug 2010 22:28:29 +1000 Subject: Removing SC_CP_DBCS as it does not fit into new DBCS processing code. Updated documentation to describe the common DBCS support between platforms and removed outdated text. --- doc/ScintillaDoc.html | 20 +------------------- gtk/ScintillaGTK.cxx | 3 +-- include/Scintilla.h | 7 ++++++- include/Scintilla.iface | 9 ++++++--- 4 files changed, 14 insertions(+), 25 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index eaad42967..fbffd64aa 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3038,28 +3038,10 @@ struct Sci_TextToFind { horizontal space, such as Thai, will mostly work but there are some issues where the characters are drawn separately leading to visual glitches. Bi-directional text is not supported.

-

On Windows, code page can be set to 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK), +

Code page can be set to 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK), 949 (Korean Unified Hangul Code), 950 (Traditional Chinese Big5), or 1361 (Korean Johab) although these may require installation of language specific support.

-

On GTK+, code page can be set to 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK), - or 950 (Traditional Chinese Big5). - The code page may also be set to SC_CP_DBCS (1) - which uses the current locale to handle multi byte characters which may work for otherwise unsupported - code pages.

- -

For GTK+ 1.x, the locale should be set to a Unicode locale with a call similar to - setlocale(LC_CTYPE, "en_US.UTF-8"). Fonts with an "iso10646" registry - should be used in a font set. Font sets are a comma separated list of partial font - specifications where each partial font specification can be in the form: - foundry-fontface-charsetregistry-encoding or - fontface-charsetregistry-encoding or foundry-fontface or - fontface. An example is "misc-fixed-iso10646-1,*". - On GTK+ 2.x, Pango fonts should be used rather than font sets.

- -

Setting codePage to a non-zero value that is not SC_CP_UTF8 is - operating system dependent.

-

SCI_SETKEYSUNICODE(bool keysUnicode)
SCI_GETKEYSUNICODE
On Windows, character keys are normally handled differently depending on whether Scintilla is a wide diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index ecf80a999..f381f3605 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -811,8 +811,7 @@ bool ScintillaGTK::ValidCodePage(int codePage) const { || codePage == 936 || codePage == 949 || codePage == 950 - || codePage == 1361 - || codePage == SC_CP_DBCS; + || codePage == 1361; } sptr_t ScintillaGTK::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { diff --git a/include/Scintilla.h b/include/Scintilla.h index 16137ca1d..c20a063f9 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -91,7 +91,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETTABWIDTH 2036 #define SCI_GETTABWIDTH 2121 #define SC_CP_UTF8 65001 -#define SC_CP_DBCS 1 #define SCI_SETCODEPAGE 2037 #define SCI_SETUSEPALETTE 2039 #define MARKER_MAX 31 @@ -975,4 +974,10 @@ struct SCNotification { } #endif +#ifdef INCLUDE_DEPRECATED_FEATURES + +#define SC_CP_DBCS 1 + +#endif + #endif diff --git a/include/Scintilla.iface b/include/Scintilla.iface index de24e552a..2516b7134 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -224,9 +224,6 @@ get int GetTabWidth=2121(,) # This is the same value as CP_UTF8 in Windows val SC_CP_UTF8=65001 -# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. -val SC_CP_DBCS=1 - # Set the code page used to interpret the bytes of the document as characters. # The SC_CP_UTF8 value can be used to enter Unicode mode. set void SetCodePage=2037(int codePage,) @@ -3844,3 +3841,9 @@ evt void IndicatorClick=2023(int modifiers, int position) evt void IndicatorRelease=2024(int modifiers, int position) evt void AutoCCancelled=2025(void) evt void AutoCCharDeleted=2026(void) + +cat Deprecated + +# Deprecated in 2.21 +# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. +val SC_CP_DBCS=1 -- cgit v1.2.3