]>
Commit | Line | Data |
---|---|---|
3e524028 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.102 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.2.102 (after 7.2.100) | |
11 | Problem: When 'encoding' is "utf-8" a BOM at the start of a Vim script is | |
12 | not removed. (Tony Mechelynck) | |
13 | Solution: When no conversion is taking place make a copy of the line without | |
14 | the BOM. | |
15 | Files: src/ex_cmds2.c | |
16 | ||
17 | ||
18 | *** ../vim-7.2.101/src/ex_cmds2.c Wed Feb 4 17:49:46 2009 | |
19 | --- src/ex_cmds2.c Thu Feb 5 20:41:56 2009 | |
20 | *************** | |
21 | *** 3013,3018 **** | |
22 | --- 3013,3020 ---- | |
23 | /* Found BOM; setup conversion, skip over BOM and recode the line. */ | |
24 | convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc); | |
25 | p = string_convert(&cookie.conv, firstline + 3, NULL); | |
26 | + if (p == NULL) | |
27 | + p = vim_strsave(firstline + 3); | |
28 | if (p != NULL) | |
29 | { | |
30 | vim_free(firstline); | |
31 | *** ../vim-7.2.101/src/version.c Wed Feb 4 18:34:54 2009 | |
32 | --- src/version.c Thu Feb 5 20:44:55 2009 | |
33 | *************** | |
34 | *** 678,679 **** | |
35 | --- 678,681 ---- | |
36 | { /* Add new patch number below this line */ | |
37 | + /**/ | |
38 | + 102, | |
39 | /**/ | |
40 | ||
41 | -- | |
42 | CVS sux, men don't like commitment | |
43 | ||
44 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
45 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
46 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
47 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |