To: vim-dev@vim.org Subject: Patch 6.1.327 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.327 Problem: When opening the "mbyte.txt" help file the utf-8 characters are unreadable, because the fileencoding is forced to be latin1. Solution: Check for utf-8 encoding first in help files. (Daniel Elstner) Files: runtime/doc/mbyte.txt, src/fileio.c *** ../vim61.326/runtime/doc/mbyte.txt Fri Mar 22 21:18:37 2002 --- runtime/doc/mbyte.txt Thu Feb 6 20:46:54 2003 *************** *** 1,4 **** ! *mbyte.txt* For Vim version 6.1. Last change: 2002 Feb 28 VIM REFERENCE MANUAL by Bram Moolenaar et al. --- 1,4 ---- ! *mbyte.txt* For Vim version 6.1. Last change: 2003 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar et al. *************** *** 29,34 **** --- 29,37 ---- 10. Using UTF-8 |mbyte-utf8| 11. Overview of options |mbyte-options| + NOTE: This file contains UTF-8 characters. These may show up as strange + characters or boxes when using another encoding. + ============================================================================== 1. Getting started *mbyte-first* *************** *** 991,997 **** It's possible to have more than one character in the first column. This works like a dead key. Example: > ! 'a á Since Vim doesn't know if the next character after a quote is really an "a", it will wait for the next character. To be able to insert a single quote, also add this line: > --- 1011,1017 ---- It's possible to have more than one character in the first column. This works like a dead key. Example: > ! 'a á Since Vim doesn't know if the next character after a quote is really an "a", it will wait for the next character. To be able to insert a single quote, also add this line: > *** ../vim61.326/src/fileio.c Sun Feb 2 13:41:28 2003 --- src/fileio.c Sun Feb 16 16:00:46 2003 *************** *** 708,714 **** } else if (curbuf->b_help) { ! fenc = (char_u *)"latin1"; /* help files are latin1 */ fenc_alloced = FALSE; } else if (*p_fencs == NUL) --- 708,722 ---- } else if (curbuf->b_help) { ! /* Help files are either utf-8 or latin1. Try utf-8 first, if this ! * fails it must be latin1. Only do this when 'encoding' is utf-8 to ! * avoid [converted] remarks all the time. */ ! fenc = (char_u *)"latin1"; ! if (enc_utf8) ! { ! fenc_next = fenc; ! fenc = (char_u *)"utf-8"; ! } fenc_alloced = FALSE; } else if (*p_fencs == NUL) *** ../vim61.326/src/version.c Sun Feb 16 21:46:15 2003 --- src/version.c Sun Feb 16 21:52:40 2003 *************** *** 608,609 **** --- 612,615 ---- { /* Add new patch number below this line */ + /**/ + 327, /**/ -- hundred-and-one symptoms of being an internet addict: 267. You get an extra phone line so you can get phone calls. /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///