67 lines
2.0 KiB
Plaintext
67 lines
2.0 KiB
Plaintext
|
To: vim-dev@vim.org
|
||
|
Subject: patch 7.0.206
|
||
|
Fcc: outbox
|
||
|
From: Bram Moolenaar <Bram@moolenaar.net>
|
||
|
Mime-Version: 1.0
|
||
|
Content-Type: text/plain; charset=ISO-8859-1
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
------------
|
||
|
|
||
|
Patch 7.0.206 (after 7.0.058)
|
||
|
Problem: Some characters of the "gb18030" encoding are not handled
|
||
|
properly.
|
||
|
Solution: Do not use "cp936" as an alias for "gb18030" encoding. Instead
|
||
|
initialize 'encoding' to "cp936".
|
||
|
Files: src/mbyte.c, src/option.c
|
||
|
|
||
|
|
||
|
*** ../vim-7.0.205/src/mbyte.c Tue Dec 5 22:09:02 2006
|
||
|
--- src/mbyte.c Tue Feb 27 16:27:44 2007
|
||
|
***************
|
||
|
*** 364,370 ****
|
||
|
{"949", IDX_CP949},
|
||
|
{"936", IDX_CP936},
|
||
|
{"gbk", IDX_CP936},
|
||
|
- {"gb18030", IDX_CP936}, /* only 99% the same */
|
||
|
{"950", IDX_CP950},
|
||
|
{"eucjp", IDX_EUC_JP},
|
||
|
{"unix-jis", IDX_EUC_JP},
|
||
|
--- 364,369 ----
|
||
|
*** ../vim-7.0.205/src/option.c Tue Oct 17 18:36:03 2006
|
||
|
--- src/option.c Thu Mar 1 21:02:06 2007
|
||
|
***************
|
||
|
*** 3290,3295 ****
|
||
|
--- 3290,3303 ----
|
||
|
* If not, go back to the default "latin1". */
|
||
|
save_enc = p_enc;
|
||
|
p_enc = p;
|
||
|
+ if (STRCMP(p_enc, "gb18030") == 0)
|
||
|
+ {
|
||
|
+ /* We don't support "gb18030", but "cp936" is a good substitute
|
||
|
+ * for practical purposes, thus use that. It's not an alias to
|
||
|
+ * still support conversion between gb18030 and utf-8. */
|
||
|
+ p_enc = vim_strsave((char_u *)"cp936");
|
||
|
+ vim_free(p);
|
||
|
+ }
|
||
|
if (mb_init() == NULL)
|
||
|
{
|
||
|
opt_idx = findoption((char_u *)"encoding");
|
||
|
*** ../vim-7.0.205/src/version.c Tue Feb 27 23:06:44 2007
|
||
|
--- src/version.c Fri Mar 2 19:58:04 2007
|
||
|
***************
|
||
|
*** 668,669 ****
|
||
|
--- 668,671 ----
|
||
|
{ /* Add new patch number below this line */
|
||
|
+ /**/
|
||
|
+ 206,
|
||
|
/**/
|
||
|
|
||
|
--
|
||
|
You can tune a file system, but you can't tuna fish
|
||
|
-- man tunefs
|
||
|
|
||
|
/// Bram Moolenaar -- Bram@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 ///
|