]>
Commit | Line | Data |
---|---|---|
0a7814d6 AG |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.1.079 | |
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.1.079 | |
11 | Problem: When the locale is "C" and 'encoding' is "latin1" then the "@" | |
12 | character in 'isfname', 'isprint', etc. doesn't pick up accented | |
13 | characters. | |
14 | Solution: Instead of isalpha() use MB_ISLOWER() and MB_ISUPPER(). | |
15 | Files: src/charset.c, src/macros.h | |
16 | ||
17 | ||
18 | *** ../vim-7.1.078/src/charset.c Mon Aug 6 22:27:12 2007 | |
19 | --- src/charset.c Tue Aug 14 13:43:30 2007 | |
20 | *************** | |
21 | *** 207,213 **** | |
22 | } | |
23 | while (c <= c2) | |
24 | { | |
25 | ! if (!do_isalpha || isalpha(c) | |
26 | #ifdef FEAT_FKMAP | |
27 | || (p_altkeymap && (F_isalpha(c) || F_isdigit(c))) | |
28 | #endif | |
29 | --- 207,216 ---- | |
30 | } | |
31 | while (c <= c2) | |
32 | { | |
33 | ! /* Use the MB_ functions here, because isalpha() doesn't | |
34 | ! * work properly when 'encoding' is "latin1" and the locale is | |
35 | ! * "C". */ | |
36 | ! if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c) | |
37 | #ifdef FEAT_FKMAP | |
38 | || (p_altkeymap && (F_isalpha(c) || F_isdigit(c))) | |
39 | #endif | |
40 | *** ../vim-7.1.078/src/macros.h Thu May 10 19:21:00 2007 | |
41 | --- src/macros.h Sat Aug 4 13:44:18 2007 | |
42 | *************** | |
43 | *** 54,63 **** | |
44 | ||
45 | /* | |
46 | * toupper() and tolower() that use the current locale. | |
47 | ! * On some systems toupper()/tolower() only work on lower/uppercase characters | |
48 | * Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the | |
49 | * range 0 - 255. toupper()/tolower() on some systems can't handle others. | |
50 | ! * Note: for UTF-8 use utf_toupper() and utf_tolower(). | |
51 | */ | |
52 | #ifdef MSWIN | |
53 | # define TOUPPER_LOC(c) toupper_tab[(c) & 255] | |
54 | --- 54,65 ---- | |
55 | ||
56 | /* | |
57 | * toupper() and tolower() that use the current locale. | |
58 | ! * On some systems toupper()/tolower() only work on lower/uppercase | |
59 | ! * characters, first use islower() or isupper() then. | |
60 | * Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the | |
61 | * range 0 - 255. toupper()/tolower() on some systems can't handle others. | |
62 | ! * Note: It is often better to use MB_TOLOWER() and MB_TOUPPER(), because many | |
63 | ! * toupper() and tolower() implementations only work for ASCII. | |
64 | */ | |
65 | #ifdef MSWIN | |
66 | # define TOUPPER_LOC(c) toupper_tab[(c) & 255] | |
67 | *** ../vim-7.1.078/src/version.c Wed Aug 15 20:07:53 2007 | |
68 | --- src/version.c Wed Aug 15 20:39:18 2007 | |
69 | *************** | |
70 | *** 668,669 **** | |
71 | --- 668,671 ---- | |
72 | { /* Add new patch number below this line */ | |
73 | + /**/ | |
74 | + 79, | |
75 | /**/ | |
76 | ||
77 | -- | |
78 | You're as much use as a condom machine at the Vatican. | |
79 | -- Rimmer to Holly in Red Dwarf 'Queeg' | |
80 | ||
81 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
82 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
83 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
84 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |