Re: 2html make 'charset' when encodig is 'cp932'

13 views
Skip to first unread message

Edward L. Fox

unread,
Sep 1, 2007, 12:52:26 AM9/1/07
to vim...@googlegroups.com, vim_mu...@googlegroups.com, mattn, vim...@vim.org, br...@moolenaar.net
Hi all Chinese, Taiwanese, Japanese and Korean users,

(cross-posting to vim_multibyte)

On 9/1/07, Bram Moolenaar <Br...@moolenaar.net> wrote:
> [...]
> Looks OK to me.
>
> Can we do the same for cp950, considering it equal to big5?

Please help me checking these:

cp932 => "Shift_JIS" (Japanese)
cp936 => "GBK" (Chinese)
cp949 => "euc-kr" (Korean) ??? Is this correct?
cp950 => "Big5" (Taiwanese)

Are those above correct? If so, I'll make the "official" patch soon.

> [...]

Regards,

Edward

Edward L. Fox

unread,
Sep 1, 2007, 5:59:38 AM9/1/07
to 范德成, vim...@googlegroups.com, vim_mu...@googlegroups.com
On 9/1/07, 范德成 <dts...@citiz.net> wrote:
> [...]
>
> I know on Windows cp936 is mostly the same as GBK.

Yes. In fact cp936 *is* GBK. I'm caring about the remaining code
pages' charset names, especially Korean, I'm quite uncertain about
that.

>
> --
> Fan Decheng
> dts...@citiz.net
>
>
>

Edward

Bram Moolenaar

unread,
Sep 1, 2007, 8:10:47 AM9/1/07
to Edward L. Fox, vim...@googlegroups.com, vim_mu...@googlegroups.com, mattn, vim...@vim.org

Edward L. Fox wrote:

We already recognize cp949 and cp936. cp932 was just added, I suggested
recognizing cp950 as "big5".

--
This is an airconditioned room, do not open Windows.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Edward L. Fox

unread,
Sep 2, 2007, 11:37:58 AM9/2/07
to Bram Moolenaar, vim...@googlegroups.com, vim_mu...@googlegroups.com, mattn, vim...@vim.org
Hi Matsumoto and Bram,

On 9/1/07, Bram Moolenaar <Br...@moolenaar.net> wrote:
>
> Edward L. Fox wrote:
>
> > Hi all Chinese, Taiwanese, Japanese and Korean users,
> >
> > (cross-posting to vim_multibyte)
> >
> > On 9/1/07, Bram Moolenaar <Br...@moolenaar.net> wrote:
> > > [...]
> > > Looks OK to me.
> > >
> > > Can we do the same for cp950, considering it equal to big5?
> >
> > Please help me checking these:
> >
> > cp932 => "Shift_JIS" (Japanese)
> > cp936 => "GBK" (Chinese)
> > cp949 => "euc-kr" (Korean) ??? Is this correct?
> > cp950 => "Big5" (Taiwanese)
> >
> > Are those above correct? If so, I'll make the "official" patch soon.
>
> We already recognize cp949 and cp936. cp932 was just added, I suggested
> recognizing cp950 as "big5".

Here is a quite-simple-and-small patch according to your request.

--- 2html.vim 2007-05-09 12:06:26.000000000 +0800
+++ /tmp/2html.vim 2007-09-02 23:35:55.000000000 +0800
@@ -162,9 +162,9 @@
let s:html_encoding = 'iso-8859-1'
elseif s:vim_encoding =~ "^cp12"
let s:html_encoding = substitute(s:vim_encoding, 'cp', 'windows-', '')
- elseif s:vim_encoding == 'sjis'
+ elseif s:vim_encoding == 'sjis' || s:vim_encoding == 'cp932'
let s:html_encoding = 'Shift_JIS'
- elseif s:vim_encoding == 'big5'
+ elseif s:vim_encoding == 'big5' || s:vim_encoding == 'cp950'
let s:html_encoding = "Big5"
elseif s:vim_encoding == 'euc-cn'
let s:html_encoding = 'GB_2312-80'


>
> --
> This is an airconditioned room, do not open Windows.
>
> /// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ download, build and distribute -- http://www.A-A-P.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
>

Best regards,

Edward L. Fox

Reply all
Reply to author
Forward
0 new messages