Loading ...
Sorry, an error occurred while loading the content.

Re: Please add "big5-hkscs" charset support to vim

Expand Messages
  • Bram Moolenaar
    ... The list mentions aliases for encoding names, so that the same name is always used for encodings that are identical. An alias should not be used for
    Message 1 of 6 , Dec 31 3:07 AM
      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.

      The list mentions aliases for encoding names, so that the same name is
      always used for encodings that are identical. An alias should not be
      used for encodings that are similar but not identical, because it will
      cause problems when doing conversions.

      > 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
      > compatibility.
      > 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.

      I think it's better to change this only when we know it's the right
      thing to do. When we don't include this change, editing big5-hkscs
      files should still work if you tell Vim it's a double-byte encoding,
      right? The name should be something like "2byte-big5-hkscs".

      We could add another entry for this encoding, not an alias.

      hundred-and-one symptoms of being an internet addict:
      240. You think Webster's Dictionary is a directory of WEB sites.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.