Dear Neil,

> If I want to support asian fonts to input and display in Scintilla in
> English OS,
> is there any difference between the following behavior?
> 1. Set codepage with utf-8, compile with Unicode mode as you mentioned;
> 2. Set codepage with asian codepage (CJK), compile with non-unicode
mode.

   The preferred approach is
3. Set codepage to UTF-8, compile with non-Unicode mode.

   CJK works quite well with ANSI windows. It is only some of the more
recently supported languages (mostly Indic) that have no ANSI code
pages.

   The main difference between your 1 and 2 is the encoding of the
buffer and thus (commonly) the file. If your users want Unicode files
then UTF-8 is the right code page to use in Scintilla. If they want a
traditional DBCS like Shift-JIS, set that as the code page. Another
issue is that the Unicode mode mentioned in 1 has not been extensively
tested.

   If someone works out a clean way to integrate the commented out
code mentioned earlier in this thread (perhaps registering both an
ANSI and wide version of the Scintilla window class, in a similar way
to RichEdit) and is prepared to support the code, fixing any bugs then
I'll accept a patch. There are sure to be lots of issues with this
approach.

   Neil

Thanks for your explanation. My focus will be traditional DBCS file. I have tested Scintilla in XP English, it works well for CJK with the right codepage.
But it cannot support CJK font display/edit in Win98 English.
Maybe this is Win98 OS limitation.

I have one more question about "Scintilla buffer" codepage.
I am very confused with these. I guess if DBCS file encoding has CJK codepage, when I set codepage CJK to scintilla buffer, the buffer will change the file content with the specified codepage, right?

About Unicode mode compile:
For multilingual support in one application, Unicode compile should be preferred. I have tested original Scintilla lexer Dll (non-Unicode) v1.66 with a unicode-compile application in VC6, it seems to work. But since Scintilla in fact uses DBCS API (such as RegisterClassExA), I doubt it is better to use your commented code, although I use CreateExW with L"Scintilla" class name. Current I don't find any side-effect for non-unicode compile except this Unicode Malayalam font question.

Jeffrey Ren

_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to