4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When using translated help files with non-ASCII latin1 characters
12 in the first line the utf-8 detection is wrong.
13 Solution: Properly detect utf-8 characters. When a mix of encodings is
14 detected continue with the next language and avoid a "no matches"
15 error because of "got_int" being set. Add the directory name to
16 the error message for a duplicate tag.
20 *** ../vim-6.3.001/src/ex_cmds.c Wed Jun 9 14:56:26 2004
21 --- src/ex_cmds.c Thu Jun 10 21:08:05 2004
28 + int mix = FALSE; /* detected mixed encodings */
34 EW_FILE|EW_SILENT) == FAIL
37 ! EMSG2("E151: No match: %s", NameBuff);
42 EW_FILE|EW_SILENT) == FAIL
46 ! EMSG2("E151: No match: %s", NameBuff);
54 /* Detect utf-8 file by a non-ASCII char in the first line. */
56 for (s = IObuff; *s != NUL; ++s)
61 else if (utf8 != this_utf8)
63 EMSG2(_("E670: Mix of help file encodings within a language: %s"), files[fi]);
70 /* Detect utf-8 file by a non-ASCII char in the first line. */
72 for (s = IObuff; *s != NUL; ++s)
78 ! l = utf_ptr2len_check(s);
81 ! /* Illegal UTF-8 byte sequence. */
87 ! if (this_utf8 == MAYBE) /* only ASCII characters found */
89 ! if (utf8 == MAYBE) /* first file */
91 else if (utf8 != this_utf8)
93 EMSG2(_("E670: Mix of help file encodings within a language: %s"), files[fi]);
102 sprintf((char *)NameBuff,
103 ! _("E154: Duplicate tag \"%s\" in file %s"),
104 ! ((char_u **)ga.ga_data)[i], p2 + 1);
111 sprintf((char *)NameBuff,
112 ! _("E154: Duplicate tag \"%s\" in file %s/%s"),
113 ! ((char_u **)ga.ga_data)[i], dir, p2 + 1);
125 + got_int = FALSE; /* continue with other languages */
128 for (i = 0; i < ga.ga_len; ++i)
129 vim_free(((char_u **)ga.ga_data)[i]);
130 *** ../vim-6.3.001/src/version.c Wed Jun 9 14:59:11 2004
131 --- src/version.c Thu Jun 10 20:53:19 2004
135 { /* Add new patch number below this line */
141 From "know your smileys":
142 % Bike accident (a bit far-fetched, I suppose)
144 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
145 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
146 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
147 \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///