Vladimir Marek wrote: > Hi, > > I would like to report a bug found by Keiichi Oono on Japan encoding and > vim. > > > After investigation of vim source files, it's clear that the vim does not > > support ja_JP.PCK environment to edit SJIS (PCK) characters without manual > > configuration. > > . > > Configuration > > ------------- > > Create $HOME/.vimrc if it does not exist, and add the following line to open > > file as SJIS encoding: > > . > > :set encoding=sjis > > . > > . > > Reason > > ------ > > It can be seen in the vim source file src/mbyte.c. The vim try to get > > runtime > > file encoding by nl_langinfo(3C). The function call "nl_langinfo(CODESET)" > > returns "PCK" when runtime locale is "ja_JP.PCK". The encoding name "PCK" is > > not supported by vim 7.3 bundled in Solaris 11. To support "pck" without > > manual configuratoin as described at above, "pck" needs to be added as an > > alias of "sjis" in enc_alias_table[]: > > . > > $ diff -u mbyte.c.orig mbyte.c > > --- mbyte.c.orig Tue Nov 18 11:33:57 2014 > > +++ mbyte.c Tue Nov 18 11:34:32 2014 > > @@ -396,6 +396,7 @@ > > {"unix-jis", IDX_EUC_JP}, > > {"ujis", IDX_EUC_JP}, > > {"shift-jis", IDX_SJIS}, > > + {"pck", IDX_SJIS}, /* Sun: PCK */ > > {"euckr", IDX_EUC_KR}, > > {"5601", IDX_EUC_KR}, /* Sun: KS C 5601 */ > > {"euccn", IDX_EUC_CN}, > > . > > I've confirmed that the above patch works both vim 7.3 and vim 7.4 > > Can you please consider including the fix into vim source base? I am > attaching diff applicable to current mercurial workspace. > > All credits to Keiichi Oono.
I'll include the patch, thanks. -- SIGFUN -- signature too funny (core dumped) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.