778Re: Please add "big5-hkscs" charset support to vim
- Dec 31, 2002Hello Bram,
On Sat, Dec 28, 2002 at 05:56:15PM +0100, Bram Moolenaar wrote:
> Anthony Fok wrote:
> > Since we'd like to enter Big5-HKSCS Chinese characters in vim (with the
> > zh_HK.Big5-HKSCS locale), please apply the attached patch. :-) It has been
> > tested to work under GNU/Linux.
> > I am not sure whether big5-hkscs is considered as "cp950" or "cp951" on
> > Windows. If any of you know, perhaps you can add more aliases to
> > mbyte.c. Thanks again!
> You are using DBCS_CHT for "big5-hkscs". That's Chinese-Taiwan. Are
> you sure this is exactly the same as "big5-hkscs" (Hong Kong?)?
> I suspect that "big5" and "big5-hkscs" are slightly different, otherwise
> there would not be a different name. Handling it mostly like big5 might
> mostly work, but cause subtle problems in some cases. Isn't there a
> better solution?
It depends on what VIM does with macros like DBCS_CHT. If VIM just use
these macros to check the character range, then it is okay for big5-hkscs
to use DBCS_CHT too. They both have the same valid range:
1st byte: 0x81-0xFE
2nd byte: 0x40-0x7E, 0x81-0xFE
But yes, they are different character set. Big5-HKSCS is more-or-less a
superset of Big5.
Oh, I remember now why I listed big5-hkscs to use DBCS_CHT too. It is
because of "Code Page 950". I am not exactly sure what Microsoft uses for
Big5-HKSCS. They provide a hkscs*.exe file for download, which include a
cp951.nls, but instead of actually providing Code Page 951, Microsoft
Windows tends to "masquerade" Big5-HKSCS as Code Page 950 on systems that
have installed Big5-HKSCS support in order to maintain backward
Note that I am not exactly sure of the situation. Nevertheless, if the
patch I submitted does not affect operation with the original "big5" in vim,
then let's try it out first, and then wait for reports from MS Windows VIM
Big5-HKSCS users. :-)
Of course, if someone knows more about the actual situation (whether MS
Windows "masquerades" CP950 or actually provides a CP951), please comment.
Anthony Fok Tung-Ling
ThizLinux Laboratory <anthony@...> http://www.thizlinux.com/
Debian Chinese Project <foka@...> http://www.debian.org/intl/zh/
Come visit Our Lady of Victory Camp! http://www.olvc.ab.ca/
- << Previous post in topic Next post in topic >>