Re: GB18030 != CP936

2007-03-01 Thread Edward L. Fox
Hi all, On 3/1/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: Hi Bram, On 3/1/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > Yongwei Wu wrote: > > > My main point is that if our purpose is to make Vim novices edit > > Simplified Chinese files (almost always encoded in GBK) without > > troubles in

Re: GB18030 != CP936

2007-02-28 Thread Yongwei Wu
Hi Bram, On 3/1/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: > My main point is that if our purpose is to make Vim novices edit > Simplified Chinese files (almost always encoded in GBK) without > troubles in the zh_CN.GB18030 environment, a hack to set encoding to > CP936 wi

Re: GB18030 != CP936

2007-02-28 Thread Bram Moolenaar
Yongwei Wu wrote: > > It would be possible to make a special case for GB18030 in set_init_1(). > > This would set 'encoding' to "utf-8" and 'termencoding' to "GB18030". > > Perhaps you can try these settings and check if everything works: > > translated menus, input methods, using Vim in a termin

Re: GB18030 != CP936

2007-02-27 Thread A.J.Mechelynck
Yongwei Wu wrote: Hi Tony, On 2/28/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: >> It would be possible to make a special case for GB18030 in set_init_1(). >> This would set 'encoding' to "utf-8" and 'termencoding' to "GB18030". >> Perhaps you can try these settings and check if everything wo

Re: GB18030 != CP936

2007-02-27 Thread Yongwei Wu
Hi Tony, On 2/28/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: >> It would be possible to make a special case for GB18030 in set_init_1(). >> This would set 'encoding' to "utf-8" and 'termencoding' to "GB18030". >> Perhaps you can try these settings and check if everything works: >> translated m

Re: GB18030 != CP936

2007-02-27 Thread Yongwei Wu
Hi Tony, On 2/28/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: >> However, if gb18030 is used in the environment >> that means that console output needs to be converted, thus >> 'termencoding' also needs to be set. > > Not if encoding==gbk. According to the discussion, Edward would want > to ali

Re: GB18030 != CP936

2007-02-27 Thread A.J.Mechelynck
Yongwei Wu wrote: Hi Bram, On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: > > > On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > > > > > If I understand it correctly is GB18030 a multi-byte character set that > > > > is mostly the same as cp936, but adds

Re: GB18030 != CP936

2007-02-27 Thread Yongwei Wu
Hi Bram, On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: > > > On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > > > > > If I understand it correctly is GB18030 a multi-byte character set that > > > > is mostly the same as cp936, but adds a number of 4-byte

Re: GB18030 != CP936

2007-02-27 Thread A.J.Mechelynck
Yongwei Wu wrote: Hi Bram, On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: > On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > If I understand it correctly is GB18030 a multi-byte character set that > > is mostly the same as cp936, but adds a number of 4-

Re: GB18030 != CP936

2007-02-27 Thread Bram Moolenaar
Yongwei Wu wrote: > > > On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > > > > > If I understand it correctly is GB18030 a multi-byte character set that > > > > is mostly the same as cp936, but adds a number of 4-byte characters. > > > > Vim does not support those 4-byte characters,

Re: GB18030 != CP936

2007-02-27 Thread Yongwei Wu
Hi Bram, On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: > On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > If I understand it correctly is GB18030 a multi-byte character set that > > is mostly the same as cp936, but adds a number of 4-byte characters. > >

Re: GB18030 != CP936 (Alternative project?)

2007-02-27 Thread Bram Moolenaar
Tony Mechelynck wrote: > Here is an alternative way to handle it, which may be "the right way" > from a conceptual point of view, and in the long term, though it may > be much more difficult from the coding point of view. It may or may > not be "the right thing to do" pragmatically: > > Treat GB

Re: GB18030 != CP936

2007-02-27 Thread Bram Moolenaar
Yongwei Wu wrote: > On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > If I understand it correctly is GB18030 a multi-byte character set that > > is mostly the same as cp936, but adds a number of 4-byte characters. > > Vim does not support those 4-byte characters, thus setting 'encodi

Re: GB18030 != CP936 (Alternative project?)

2007-02-27 Thread Yongwei Wu
Hi Tony, On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: A.J.Mechelynck wrote: > Yongwei Wu wrote: >> Hi Tony, >> >> On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: >>> Yongwei Wu wrote: >>> [...] >>> > If your purpose is only to provide a workaround for >>> > LANG=zh_CN.GB18030, cha

Re: GB18030 != CP936

2007-02-26 Thread Yongwei Wu
Hi Tony, On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: > Hi Tony, > > On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: >> Yongwei Wu wrote: >> [...] >> > If your purpose is only to provide a workaround for >> > LANG=zh_CN.GB18030, changing the environment variable

Re: GB18030 != CP936 (Alternative project?)

2007-02-26 Thread mbbill
Hello Edward, Tuesday, February 27, 2007, 11:58:30 AM, you wrote: >?Hi Tony, >?On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: >>?[...] >>?Here is an alternative way to handle it, which may be "the right way" from a >>?conceptual point of view, and in the long term, though it may be much m

Re: GB18030 != CP936 (Alternative project?)

2007-02-26 Thread A.J.Mechelynck
Edward L. Fox wrote: Hi Tony, On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: [...] Here is an alternative way to handle it, which may be "the right way" from a conceptual point of view, and in the long term, though it may be much more difficult from the coding point of view. It may or

Re: GB18030 != CP936 (Alternative project?)

2007-02-26 Thread Edward L. Fox
Hi Tony, On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: [...] Here is an alternative way to handle it, which may be "the right way" from a conceptual point of view, and in the long term, though it may be much more difficult from the coding point of view. It may or may not be "the right th

Re: GB18030 != CP936 (Alternative project?)

2007-02-26 Thread A.J.Mechelynck
A.J.Mechelynck wrote: Yongwei Wu wrote: Hi Tony, On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: [...] > If your purpose is only to provide a workaround for > LANG=zh_CN.GB18030, changing the environment variable inside main() of > Vim may be a better approach. > > Best

Re: GB18030 != CP936

2007-02-26 Thread A.J.Mechelynck
Yongwei Wu wrote: Hi Tony, On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: [...] > If your purpose is only to provide a workaround for > LANG=zh_CN.GB18030, changing the environment variable inside main() of > Vim may be a better approach. > > Best regards, > > Yongwei >

Re: GB18030 != CP936

2007-02-26 Thread Yongwei Wu
Hi Tony, On 2/27/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Yongwei Wu wrote: [...] > If your purpose is only to provide a workaround for > LANG=zh_CN.GB18030, changing the environment variable inside main() of > Vim may be a better approach. > > Best regards, > > Yongwei > ... and, if the C

Re: GB18030 != CP936

2007-02-26 Thread A.J.Mechelynck
Yongwei Wu wrote: [...] If your purpose is only to provide a workaround for LANG=zh_CN.GB18030, changing the environment variable inside main() of Vim may be a better approach. Best regards, Yongwei ... and, if the Chinese messages and menus _actually_ used by (g)vim don't use any GB18030 4

Re: GB18030 != CP936

2007-02-26 Thread Yongwei Wu
Hi Edward, On 2/27/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: Hi Vimmers, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: > On 2/26/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: > > Hi Wu, > > > > On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: > > > On 2/26/07, Edward L. Fox <[EMAIL PROTE

Re: GB18030 != CP936

2007-02-26 Thread Yongwei Wu
Hi Bram, On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: If I understand it correctly is GB18030 a multi-byte character set that is mostly the same as cp936, but adds a number of 4-byte characters. Vim does not support those 4-byte characters, thus setting 'encoding' to gb18030 won't work

Re: GB18030 != CP936

2007-02-26 Thread Bram Moolenaar
Zhaojun Wu wrote: > Hi, Yongwei, > > I am also realizing this issue during my recent research on Chinese encodings. > > As shown in the wikipedia, CP936 is just the encoding derived from > Microsoft's Windows 95. Due to the popularity of Windows OS in > mainland China, the Chinese government bu

Re: GB18030 != CP936

2007-02-26 Thread Edward L. Fox
Hi Vimmers, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: On 2/26/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: > Hi Wu, > > On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: > > On 2/26/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > > > > > The problem is in Patch 58: > > >

Re: GB18030 != CP936

2007-02-26 Thread Yongwei Wu
On 2/26/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: Hi Wu, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: > On 2/26/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > > The problem is in Patch 58: > > > > > > + {"gbk", IDX_CP936}, > > > + {"gb18030",

Re: GB18030 != CP936

2007-02-26 Thread Edward L. Fox
Hi Wu, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: On 2/26/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: > Hi all, > > > The problem is in Patch 58: > > > > + {"gbk", IDX_CP936}, > > + {"gb18030", IDX_CP936}, /* only 99% the same */ > > I made the patch.

Re: GB18030 != CP936

2007-02-26 Thread Yongwei Wu
On 2/26/07, Edward L. Fox <[EMAIL PROTECTED]> wrote: Hi all, > The problem is in Patch 58: > > + {"gbk", IDX_CP936}, > + {"gb18030", IDX_CP936}, /* only 99% the same */ I made the patch. And I knew that GB18030 and GBK is not the same. Actually it's easy to s

Re: GB18030 != CP936

2007-02-26 Thread Edward L. Fox
Hi all, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: Hi Bram, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: > Hi Bram, > > My test shows when I use ++enc to open a file in GB18030, Vim uses > CP936, which is not correct. GB18030 is a 1, 2, or 4 byte encoding, > while CP936 is a 1 or 2

Re: GB18030 != CP936

2007-02-26 Thread Zhaojun WU
On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: Thanks for the information. However, the test file is invalid. Specifically, the third character is E1 11 A0: obviously wrong. Using iconv confirmed this: iconv -f utf-8 -t gbk zh-s.utf8 明月iconv: zh-s.utf8: cannot convert Oops, I made a mistake

Re: GB18030 != CP936

2007-02-26 Thread Yongwei Wu
On 2/26/07, Zhaojun WU <[EMAIL PROTECTED]> wrote: Hi, Yongwei, I am also realizing this issue during my recent research on Chinese encodings. As shown in the wikipedia, CP936 is just the encoding derived from Microsoft's Windows 95. Due to the popularity of Windows OS in mainland China, the Chi

Re: GB18030 != CP936

2007-02-26 Thread Zhaojun WU
Hi, Yongwei, I am also realizing this issue during my recent research on Chinese encodings. As shown in the wikipedia, CP936 is just the encoding derived from Microsoft's Windows 95. Due to the popularity of Windows OS in mainland China, the Chinese government build the GBK (GB-2312 extension) o

Re: GB18030 != CP936

2007-02-25 Thread A.J.Mechelynck
Yongwei Wu wrote: Hi Bram, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: Hi Bram, My test shows when I use ++enc to open a file in GB18030, Vim uses CP936, which is not correct. GB18030 is a 1, 2, or 4 byte encoding, while CP936 is a 1 or 2 byte encoding. The iconv on my system works corre

Re: GB18030 != CP936

2007-02-25 Thread Yongwei Wu
Hi Bram, On 2/26/07, Yongwei Wu <[EMAIL PROTECTED]> wrote: Hi Bram, My test shows when I use ++enc to open a file in GB18030, Vim uses CP936, which is not correct. GB18030 is a 1, 2, or 4 byte encoding, while CP936 is a 1 or 2 byte encoding. The iconv on my system works correctly. I test with

GB18030 != CP936

2007-02-25 Thread Yongwei Wu
Hi Bram, My test shows when I use ++enc to open a file in GB18030, Vim uses CP936, which is not correct. GB18030 is a 1, 2, or 4 byte encoding, while CP936 is a 1 or 2 byte encoding. The iconv on my system works correctly. I test with gVim 7.0.201 on Windows XP. Please check. Thanks. Best reg