4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Tables for Unicode case operators are outdated.
12 Solution: Add a Vim script for generating the tables. Include tables for
14 Files: runtime/tools/README.txt, runtime/tools/unicode.vim, src/mbyte.c
17 *** ../vim-7.2.329/runtime/tools/README.txt 2005-12-02 01:47:43.000000000 +0100
18 --- runtime/tools/README.txt 2010-01-12 19:43:13.000000000 +0100
22 xcmdsrv_client.c: Example for a client program that communicates with a Vim
23 server through the X-Windows interface.
25 + unicode.vim Vim script to generate tables for src/mbyte.c.
27 [xxd (and tee for OS/2) can be found in the src directory]
28 *** ../vim-7.2.329/runtime/tools/unicode.vim 2010-01-12 19:47:33.000000000 +0100
29 --- runtime/tools/unicode.vim 2010-01-12 19:42:14.000000000 +0100
33 + " Script to extract tables from Unicode .txt files, to be used in src/mbyte.c.
34 + " The format of the UnicodeData.txt file is explained here:
35 + " http://www.unicode.org/Public/5.1.0/ucd/UCD.html
36 + " For the other files see the header.
38 + " Usage: Vim -S <this-file>
40 + " Author: Bram Moolenaar
41 + " Last Update: 2010 Jan 12
43 + " Parse lines of UnicodeData.txt. Creates a list of lists in s:dataprops.
44 + func! ParseDataToProps()
45 + let s:dataprops = []
47 + while lnum <= line('$')
48 + let l = split(getline(lnum), '\s*;\s*', 1)
50 + echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 15'
53 + call add(s:dataprops, l)
58 + " Parse lines of CaseFolding.txt. Creates a list of lists in s:foldprops.
59 + func! ParseFoldProps()
60 + let s:foldprops = []
62 + while lnum <= line('$')
63 + let line = getline(lnum)
64 + if line !~ '^#' && line !~ '^\s*$'
65 + let l = split(line, '\s*;\s*', 1)
67 + echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 4'
70 + call add(s:foldprops, l)
76 + " Parse lines of EastAsianWidth.txt. Creates a list of lists in s:widthprops.
77 + func! ParseWidthProps()
78 + let s:widthprops = []
80 + while lnum <= line('$')
81 + let line = getline(lnum)
82 + if line !~ '^#' && line !~ '^\s*$'
83 + let l = split(line, '\s*;\s*', 1)
85 + echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 2'
88 + call add(s:widthprops, l)
94 + " Build the toLower or toUpper table in a new buffer.
96 + func! BuildCaseTable(name, index)
102 + for p in s:dataprops
103 + if p[a:index] != ''
104 + let n = ('0x' . p[0]) + 0
105 + let nl = ('0x' . p[a:index]) + 0
106 + if start >= 0 && add == nl - n && (step == 0 || n - end == step)
107 + " continue with same range.
112 + " produce previous range
113 + call Range(ranges, start, end, step, add)
123 + call Range(ranges, start, end, step, add)
126 + " New buffer to put the result in.
128 + exe "file to" . a:name
129 + call setline(1, "static convertStruct to" . a:name . "[] =")
130 + call setline(2, "{")
131 + call append('$', ranges)
132 + call setline('$', getline('$')[:-2]) " remove last comma
133 + call setline(line('$') + 1, "};")
137 + " Build the foldCase table in a new buffer.
138 + " Uses s:foldprops.
139 + func! BuildFoldTable()
145 + for p in s:foldprops
146 + if p[1] == 'C' || p[1] == 'S'
147 + let n = ('0x' . p[0]) + 0
148 + let nl = ('0x' . p[2]) + 0
149 + if start >= 0 && add == nl - n && (step == 0 || n - end == step)
150 + " continue with same range.
155 + " produce previous range
156 + call Range(ranges, start, end, step, add)
166 + call Range(ranges, start, end, step, add)
169 + " New buffer to put the result in.
172 + call setline(1, "static convertStruct foldCase[] =")
173 + call setline(2, "{")
174 + call append('$', ranges)
175 + call setline('$', getline('$')[:-2]) " remove last comma
176 + call setline(line('$') + 1, "};")
180 + func! Range(ranges, start, end, step, add)
181 + let s = printf("\t{0x%x,0x%x,%d,%d},", a:start, a:end, a:step == 0 ? -1 : a:step, a:add)
182 + call add(a:ranges, s)
185 + " Build the combining table.
186 + " Uses s:dataprops.
187 + func! BuildCombiningTable()
191 + for p in s:dataprops
192 + if p[2] == 'Mn' || p[2] == 'Mc' || p[2] == 'Me'
193 + let n = ('0x' . p[0]) + 0
194 + if start >= 0 && end + 1 == n
195 + " continue with same range.
199 + " produce previous range
200 + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
208 + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
211 + " New buffer to put the result in.
214 + call setline(1, " static struct interval combining[] =")
215 + call setline(2, " {")
216 + call append('$', ranges)
217 + call setline('$', getline('$')[:-2]) " remove last comma
218 + call setline(line('$') + 1, " };")
222 + " Build the ambiguous table in a new buffer.
223 + " Uses s:widthprops and s:dataprops.
224 + func! BuildAmbiguousTable()
229 + for p in s:widthprops
231 + let n = ('0x' . p[0]) + 0
232 + " Find this char in the data table.
234 + let dn = ('0x' . s:dataprops[dataidx][0]) + 0
241 + echoerr "Cannot find character " . n . " in data table"
243 + " Only use the char when it's not a composing char.
244 + let dp = s:dataprops[dataidx]
245 + if dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me'
246 + if start >= 0 && end + 1 == n
247 + " continue with same range.
251 + " produce previous range
252 + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
256 + let end = ('0x' . substitute(p[0], '.*\.\.', '', '')) + 0
265 + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
268 + " New buffer to put the result in.
271 + call setline(1, " static struct interval ambiguous[] =")
272 + call setline(2, " {")
273 + call append('$', ranges)
274 + call setline('$', getline('$')[:-2]) " remove last comma
275 + call setline(line('$') + 1, " };")
281 + " Edit the Unicode text file. Requires the netrw plugin.
282 + edit http://unicode.org/Public/UNIDATA/UnicodeData.txt
284 + " Parse each line, create a list of lists.
285 + call ParseDataToProps()
287 + " Build the toLower table.
288 + call BuildCaseTable("Lower", 13)
290 + " Build the toUpper table.
291 + call BuildCaseTable("Upper", 12)
293 + " Build the ranges of composing chars.
294 + call BuildCombiningTable()
296 + " Edit the case folding text file. Requires the netrw plugin.
297 + edit http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
299 + " Parse each line, create a list of lists.
300 + call ParseFoldProps()
302 + " Build the foldCase table.
303 + call BuildFoldTable()
305 + " Edit the width text file. Requires the netrw plugin.
306 + edit http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
308 + " Parse each line, create a list of lists.
309 + call ParseWidthProps()
311 + " Build the ambiguous table.
312 + call BuildAmbiguousTable()
313 *** ../vim-7.2.329/src/mbyte.c 2009-12-02 15:03:24.000000000 +0100
314 --- src/mbyte.c 2010-01-12 19:35:49.000000000 +0100
317 * Recognizing bytes is easy: 0xxx.xxxx is a single-byte
318 * char, 10xx.xxxx is a trailing byte, 11xx.xxxx is a leading
319 * byte of a multi-byte character.
320 ! * To make things complicated, up to two composing characters
321 * are allowed. These are drawn on top of the first char.
322 * For most editing the sequence of bytes with composing
323 * characters included is considered to be one character.
325 * Recognizing bytes is easy: 0xxx.xxxx is a single-byte
326 * char, 10xx.xxxx is a trailing byte, 11xx.xxxx is a leading
327 * byte of a multi-byte character.
328 ! * To make things complicated, up to six composing characters
329 * are allowed. These are drawn on top of the first char.
330 * For most editing the sequence of bytes with composing
331 * characters included is considered to be one character.
337 ! unsigned short first;
338 ! unsigned short last;
340 static int intable __ARGS((struct interval *table, size_t size, int c));
349 static int intable __ARGS((struct interval *table, size_t size, int c));
356 ! /* sorted list of non-overlapping intervals of East Asian Ambiguous
357 ! * characters, generated with:
358 ! * "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
359 ! static struct interval ambiguous[] = {
360 ! {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8},
361 ! {0x00AA, 0x00AA}, {0x00AE, 0x00AE}, {0x00B0, 0x00B4},
362 ! {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6},
363 ! {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1},
364 ! {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED},
365 ! {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA},
366 ! {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101},
367 ! {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B},
368 ! {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133},
369 ! {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144},
370 ! {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153},
371 ! {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE},
372 ! {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4},
373 ! {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA},
374 ! {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261},
375 ! {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB},
376 ! {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB},
377 ! {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0391, 0x03A1},
378 ! {0x03A3, 0x03A9}, {0x03B1, 0x03C1}, {0x03C3, 0x03C9},
379 ! {0x0401, 0x0401}, {0x0410, 0x044F}, {0x0451, 0x0451},
380 ! {0x2010, 0x2010}, {0x2013, 0x2016}, {0x2018, 0x2019},
381 ! {0x201C, 0x201D}, {0x2020, 0x2022}, {0x2024, 0x2027},
382 ! {0x2030, 0x2030}, {0x2032, 0x2033}, {0x2035, 0x2035},
383 ! {0x203B, 0x203B}, {0x203E, 0x203E}, {0x2074, 0x2074},
384 ! {0x207F, 0x207F}, {0x2081, 0x2084}, {0x20AC, 0x20AC},
385 ! {0x2103, 0x2103}, {0x2105, 0x2105}, {0x2109, 0x2109},
386 ! {0x2113, 0x2113}, {0x2116, 0x2116}, {0x2121, 0x2122},
387 ! {0x2126, 0x2126}, {0x212B, 0x212B}, {0x2153, 0x2154},
388 ! {0x215B, 0x215E}, {0x2160, 0x216B}, {0x2170, 0x2179},
389 ! {0x2190, 0x2199}, {0x21B8, 0x21B9}, {0x21D2, 0x21D2},
390 ! {0x21D4, 0x21D4}, {0x21E7, 0x21E7}, {0x2200, 0x2200},
391 ! {0x2202, 0x2203}, {0x2207, 0x2208}, {0x220B, 0x220B},
392 ! {0x220F, 0x220F}, {0x2211, 0x2211}, {0x2215, 0x2215},
393 ! {0x221A, 0x221A}, {0x221D, 0x2220}, {0x2223, 0x2223},
394 ! {0x2225, 0x2225}, {0x2227, 0x222C}, {0x222E, 0x222E},
395 ! {0x2234, 0x2237}, {0x223C, 0x223D}, {0x2248, 0x2248},
396 ! {0x224C, 0x224C}, {0x2252, 0x2252}, {0x2260, 0x2261},
397 ! {0x2264, 0x2267}, {0x226A, 0x226B}, {0x226E, 0x226F},
398 ! {0x2282, 0x2283}, {0x2286, 0x2287}, {0x2295, 0x2295},
399 ! {0x2299, 0x2299}, {0x22A5, 0x22A5}, {0x22BF, 0x22BF},
400 ! {0x2312, 0x2312}, {0x2460, 0x24E9}, {0x24EB, 0x254B},
401 ! {0x2550, 0x2573}, {0x2580, 0x258F}, {0x2592, 0x2595},
402 ! {0x25A0, 0x25A1}, {0x25A3, 0x25A9}, {0x25B2, 0x25B3},
403 ! {0x25B6, 0x25B7}, {0x25BC, 0x25BD}, {0x25C0, 0x25C1},
404 ! {0x25C6, 0x25C8}, {0x25CB, 0x25CB}, {0x25CE, 0x25D1},
405 ! {0x25E2, 0x25E5}, {0x25EF, 0x25EF}, {0x2605, 0x2606},
406 ! {0x2609, 0x2609}, {0x260E, 0x260F}, {0x2614, 0x2615},
407 ! {0x261C, 0x261C}, {0x261E, 0x261E}, {0x2640, 0x2640},
408 ! {0x2642, 0x2642}, {0x2660, 0x2661}, {0x2663, 0x2665},
409 ! {0x2667, 0x266A}, {0x266C, 0x266D}, {0x266F, 0x266F},
410 ! {0x273D, 0x273D}, {0x2776, 0x277F}, {0xE000, 0xF8FF},
411 ! {0xFFFD, 0xFFFD}, /* {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD} */
419 ! /* Sorted list of non-overlapping intervals of East Asian Ambiguous
420 ! * characters, generated with ../runtime/tools/unicode.vim. */
421 ! static struct interval ambiguous[] =
587 ! {0x1f100, 0x1f10a},
588 ! {0x1f110, 0x1f12d},
589 ! {0x1f131, 0x1f131},
590 ! {0x1f13d, 0x1f13d},
591 ! {0x1f13f, 0x1f13f},
592 ! {0x1f142, 0x1f142},
593 ! {0x1f146, 0x1f146},
594 ! {0x1f14a, 0x1f14e},
595 ! {0x1f157, 0x1f157},
596 ! {0x1f15f, 0x1f15f},
597 ! {0x1f179, 0x1f179},
598 ! {0x1f17b, 0x1f17c},
599 ! {0x1f17f, 0x1f17f},
600 ! {0x1f18a, 0x1f18d},
601 ! {0x1f190, 0x1f190},
602 ! {0xf0000, 0xffffd},
603 ! {0x100000, 0x10fffd}
612 ! * Check for composing characters. We can handle only the first two, but
613 * skip all of them (otherwise the cursor would get stuck).
620 ! * Check for composing characters. We can handle only the first six, but
621 * skip all of them (otherwise the cursor would get stuck).
629 ! * Check for composing characters. We can handle only the first two, but
630 * skip all of them (otherwise the cursor would get stuck).
637 ! * Check for composing characters. We can handle only the first six, but
638 * skip all of them (otherwise the cursor would get stuck).
646 ! /* sorted list of non-overlapping intervals */
647 static struct interval combining[] =
649 ! {0x0300, 0x034f}, {0x0360, 0x036f}, {0x0483, 0x0486}, {0x0488, 0x0489},
650 ! {0x0591, 0x05a1}, {0x05a3, 0x05b9}, {0x05bb, 0x05bd}, {0x05bf, 0x05bf},
651 ! {0x05c1, 0x05c2}, {0x05c4, 0x05c4}, {0x0610, 0x0615}, {0x064b, 0x0658},
652 ! {0x0670, 0x0670}, {0x06d6, 0x06dc}, {0x06de, 0x06e4}, {0x06e7, 0x06e8},
653 ! {0x06ea, 0x06ed}, {0x0711, 0x0711}, {0x0730, 0x074a}, {0x07a6, 0x07b0},
654 ! {0x0901, 0x0903}, {0x093c, 0x093c}, {0x093e, 0x094d}, {0x0951, 0x0954},
655 ! {0x0962, 0x0963}, {0x0981, 0x0983}, {0x09bc, 0x09bc}, {0x09be, 0x09c4},
656 ! {0x09c7, 0x09c8}, {0x09cb, 0x09cd}, {0x09d7, 0x09d7}, {0x09e2, 0x09e3},
657 ! {0x0a01, 0x0a03}, {0x0a3c, 0x0a3c}, {0x0a3e, 0x0a42}, {0x0a47, 0x0a48},
658 ! {0x0a4b, 0x0a4d}, {0x0a70, 0x0a71}, {0x0a81, 0x0a83}, {0x0abc, 0x0abc},
659 ! {0x0abe, 0x0ac5}, {0x0ac7, 0x0ac9}, {0x0acb, 0x0acd}, {0x0ae2, 0x0ae3},
660 ! {0x0b01, 0x0b03}, {0x0b3c, 0x0b3c}, {0x0b3e, 0x0b43}, {0x0b47, 0x0b48},
661 ! {0x0b4b, 0x0b4d}, {0x0b56, 0x0b57}, {0x0b82, 0x0b82}, {0x0bbe, 0x0bc2},
662 ! {0x0bc6, 0x0bc8}, {0x0bca, 0x0bcd}, {0x0bd7, 0x0bd7}, {0x0c01, 0x0c03},
663 ! {0x0c3e, 0x0c44}, {0x0c46, 0x0c48}, {0x0c4a, 0x0c4d}, {0x0c55, 0x0c56},
664 ! {0x0c82, 0x0c83}, {0x0cbc, 0x0cbc}, {0x0cbe, 0x0cc4}, {0x0cc6, 0x0cc8},
665 ! {0x0cca, 0x0ccd}, {0x0cd5, 0x0cd6}, {0x0d02, 0x0d03}, {0x0d3e, 0x0d43},
666 ! {0x0d46, 0x0d48}, {0x0d4a, 0x0d4d}, {0x0d57, 0x0d57}, {0x0d82, 0x0d83},
667 ! {0x0dca, 0x0dca}, {0x0dcf, 0x0dd4}, {0x0dd6, 0x0dd6}, {0x0dd8, 0x0ddf},
668 ! {0x0df2, 0x0df3}, {0x0e31, 0x0e31}, {0x0e34, 0x0e3a}, {0x0e47, 0x0e4e},
669 ! {0x0eb1, 0x0eb1}, {0x0eb4, 0x0eb9}, {0x0ebb, 0x0ebc}, {0x0ec8, 0x0ecd},
670 ! {0x0f18, 0x0f19}, {0x0f35, 0x0f35}, {0x0f37, 0x0f37}, {0x0f39, 0x0f39},
671 ! {0x0f3e, 0x0f3f}, {0x0f71, 0x0f84}, {0x0f86, 0x0f87}, {0x0f90, 0x0f97},
672 ! {0x0f99, 0x0fbc}, {0x0fc6, 0x0fc6}, {0x102c, 0x1032}, {0x1036, 0x1039},
673 ! {0x1056, 0x1059}, {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753},
674 ! {0x1772, 0x1773}, {0x17b6, 0x17d3}, {0x17dd, 0x17dd}, {0x180b, 0x180d},
675 ! {0x18a9, 0x18a9}, {0x1920, 0x192b}, {0x1930, 0x193b}, {0x20d0, 0x20ea},
676 ! {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f},
680 return intable(combining, sizeof(combining), c);
685 ! /* Sorted list of non-overlapping intervals.
686 ! * Generated by ../runtime/tools/unicode.vim. */
687 static struct interval combining[] =
862 ! {0x101fd, 0x101fd},
863 ! {0x10a01, 0x10a03},
864 ! {0x10a05, 0x10a06},
865 ! {0x10a0c, 0x10a0f},
866 ! {0x10a38, 0x10a3a},
867 ! {0x10a3f, 0x10a3f},
868 ! {0x11080, 0x11082},
869 ! {0x110b0, 0x110ba},
870 ! {0x1d165, 0x1d169},
871 ! {0x1d16d, 0x1d172},
872 ! {0x1d17b, 0x1d182},
873 ! {0x1d185, 0x1d18b},
874 ! {0x1d1aa, 0x1d1ad},
875 ! {0x1d242, 0x1d244},
879 return intable(combining, sizeof(combining), c);
882 * Code for Unicode case-dependent operations. Based on notes in
883 * http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
884 * This code uses simple case folding, not full case folding.
888 ! * The following table is built by foldExtract.pl < CaseFolding.txt .
889 ! * It must be in numeric order, because we use binary search on it.
890 ! * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range
891 ! * from 0x41 to 0x5a inclusive, stepping by 1, are folded by adding 32.
898 * Code for Unicode case-dependent operations. Based on notes in
899 * http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
900 * This code uses simple case folding, not full case folding.
901 + * Last updated for Unicode 5.2.
905 ! * The following tables are built by ../runtime/tools/unicode.vim.
906 ! * They must be in numeric order, because we use binary search.
907 ! * An entry such as {0x41,0x5a,1,32} means that Unicode characters in the
908 ! * range from 0x41 to 0x5a inclusive, stepping by 1, are changed to
909 ! * folded/upper/lower by adding 32.
917 static convertStruct foldCase[] =
919 ! {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32},
920 ! {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1},
921 ! {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121},
922 ! {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1},
923 ! {0x186,0x186,-1,206}, {0x187,0x187,-1,1}, {0x189,0x18a,1,205},
924 ! {0x18b,0x18b,-1,1}, {0x18e,0x18e,-1,79}, {0x18f,0x18f,-1,202},
925 ! {0x190,0x190,-1,203}, {0x191,0x191,-1,1}, {0x193,0x193,-1,205},
926 ! {0x194,0x194,-1,207}, {0x196,0x196,-1,211}, {0x197,0x197,-1,209},
927 ! {0x198,0x198,-1,1}, {0x19c,0x19c,-1,211}, {0x19d,0x19d,-1,213},
928 ! {0x19f,0x19f,-1,214}, {0x1a0,0x1a4,2,1}, {0x1a6,0x1a6,-1,218},
929 ! {0x1a7,0x1a7,-1,1}, {0x1a9,0x1a9,-1,218}, {0x1ac,0x1ac,-1,1},
930 ! {0x1ae,0x1ae,-1,218}, {0x1af,0x1af,-1,1}, {0x1b1,0x1b2,1,217},
931 ! {0x1b3,0x1b5,2,1}, {0x1b7,0x1b7,-1,219}, {0x1b8,0x1bc,4,1},
932 ! {0x1c4,0x1c4,-1,2}, {0x1c5,0x1c5,-1,1}, {0x1c7,0x1c7,-1,2},
933 ! {0x1c8,0x1c8,-1,1}, {0x1ca,0x1ca,-1,2}, {0x1cb,0x1db,2,1},
934 ! {0x1de,0x1ee,2,1}, {0x1f1,0x1f1,-1,2}, {0x1f2,0x1f4,2,1},
935 ! {0x1f6,0x1f6,-1,-97}, {0x1f7,0x1f7,-1,-56}, {0x1f8,0x21e,2,1},
936 ! {0x220,0x220,-1,-130}, {0x222,0x232,2,1}, {0x386,0x386,-1,38},
937 ! {0x388,0x38a,1,37}, {0x38c,0x38c,-1,64}, {0x38e,0x38f,1,63},
938 ! {0x391,0x3a1,1,32}, {0x3a3,0x3ab,1,32}, {0x3d8,0x3ee,2,1},
939 ! {0x3f4,0x3f4,-1,-60}, {0x3f7,0x3f7,-1,1}, {0x3f9,0x3f9,-1,-7},
940 ! {0x3fa,0x3fa,-1,1}, {0x400,0x40f,1,80}, {0x410,0x42f,1,32},
941 ! {0x460,0x480,2,1}, {0x48a,0x4be,2,1}, {0x4c1,0x4cd,2,1},
942 ! {0x4d0,0x4f4,2,1}, {0x4f8,0x500,8,1}, {0x502,0x50e,2,1},
943 ! {0x531,0x556,1,48}, {0x1e00,0x1e94,2,1}, {0x1ea0,0x1ef8,2,1},
944 ! {0x1f08,0x1f0f,1,-8}, {0x1f18,0x1f1d,1,-8}, {0x1f28,0x1f2f,1,-8},
945 ! {0x1f38,0x1f3f,1,-8}, {0x1f48,0x1f4d,1,-8}, {0x1f59,0x1f5f,2,-8},
946 ! {0x1f68,0x1f6f,1,-8}, {0x1f88,0x1f8f,1,-8}, {0x1f98,0x1f9f,1,-8},
947 ! {0x1fa8,0x1faf,1,-8}, {0x1fb8,0x1fb9,1,-8}, {0x1fba,0x1fbb,1,-74},
948 ! {0x1fbc,0x1fbc,-1,-9}, {0x1fc8,0x1fcb,1,-86}, {0x1fcc,0x1fcc,-1,-9},
949 ! {0x1fd8,0x1fd9,1,-8}, {0x1fda,0x1fdb,1,-100}, {0x1fe8,0x1fe9,1,-8},
950 ! {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128},
951 ! {0x1ffa,0x1ffb,1,-126}, {0x1ffc,0x1ffc,-1,-9}, {0x2126,0x2126,-1,-7517},
952 ! {0x212a,0x212a,-1,-8383}, {0x212b,0x212b,-1,-8262},
953 ! {0x2160,0x216f,1,16}, {0x24b6,0x24cf,1,26}, {0xff21,0xff3a,1,32},
954 {0x10400,0x10427,1,40}
959 static convertStruct foldCase[] =
962 ! {0xb5,0xb5,-1,775},
969 ! {0x178,0x178,-1,-121},
971 ! {0x17f,0x17f,-1,-268},
972 ! {0x181,0x181,-1,210},
974 ! {0x186,0x186,-1,206},
975 ! {0x187,0x187,-1,1},
976 ! {0x189,0x18a,1,205},
977 ! {0x18b,0x18b,-1,1},
978 ! {0x18e,0x18e,-1,79},
979 ! {0x18f,0x18f,-1,202},
980 ! {0x190,0x190,-1,203},
981 ! {0x191,0x191,-1,1},
982 ! {0x193,0x193,-1,205},
983 ! {0x194,0x194,-1,207},
984 ! {0x196,0x196,-1,211},
985 ! {0x197,0x197,-1,209},
986 ! {0x198,0x198,-1,1},
987 ! {0x19c,0x19c,-1,211},
988 ! {0x19d,0x19d,-1,213},
989 ! {0x19f,0x19f,-1,214},
991 ! {0x1a6,0x1a6,-1,218},
992 ! {0x1a7,0x1a7,-1,1},
993 ! {0x1a9,0x1a9,-1,218},
994 ! {0x1ac,0x1ac,-1,1},
995 ! {0x1ae,0x1ae,-1,218},
996 ! {0x1af,0x1af,-1,1},
997 ! {0x1b1,0x1b2,1,217},
999 ! {0x1b7,0x1b7,-1,219},
1000 ! {0x1b8,0x1bc,4,1},
1001 ! {0x1c4,0x1c4,-1,2},
1002 ! {0x1c5,0x1c5,-1,1},
1003 ! {0x1c7,0x1c7,-1,2},
1004 ! {0x1c8,0x1c8,-1,1},
1005 ! {0x1ca,0x1ca,-1,2},
1006 ! {0x1cb,0x1db,2,1},
1007 ! {0x1de,0x1ee,2,1},
1008 ! {0x1f1,0x1f1,-1,2},
1009 ! {0x1f2,0x1f4,2,1},
1010 ! {0x1f6,0x1f6,-1,-97},
1011 ! {0x1f7,0x1f7,-1,-56},
1012 ! {0x1f8,0x21e,2,1},
1013 ! {0x220,0x220,-1,-130},
1014 ! {0x222,0x232,2,1},
1015 ! {0x23a,0x23a,-1,10795},
1016 ! {0x23b,0x23b,-1,1},
1017 ! {0x23d,0x23d,-1,-163},
1018 ! {0x23e,0x23e,-1,10792},
1019 ! {0x241,0x241,-1,1},
1020 ! {0x243,0x243,-1,-195},
1021 ! {0x244,0x244,-1,69},
1022 ! {0x245,0x245,-1,71},
1023 ! {0x246,0x24e,2,1},
1024 ! {0x345,0x345,-1,116},
1025 ! {0x370,0x372,2,1},
1026 ! {0x376,0x376,-1,1},
1027 ! {0x386,0x386,-1,38},
1028 ! {0x388,0x38a,1,37},
1029 ! {0x38c,0x38c,-1,64},
1030 ! {0x38e,0x38f,1,63},
1031 ! {0x391,0x3a1,1,32},
1032 ! {0x3a3,0x3ab,1,32},
1033 ! {0x3c2,0x3c2,-1,1},
1034 ! {0x3cf,0x3cf,-1,8},
1035 ! {0x3d0,0x3d0,-1,-30},
1036 ! {0x3d1,0x3d1,-1,-25},
1037 ! {0x3d5,0x3d5,-1,-15},
1038 ! {0x3d6,0x3d6,-1,-22},
1039 ! {0x3d8,0x3ee,2,1},
1040 ! {0x3f0,0x3f0,-1,-54},
1041 ! {0x3f1,0x3f1,-1,-48},
1042 ! {0x3f4,0x3f4,-1,-60},
1043 ! {0x3f5,0x3f5,-1,-64},
1044 ! {0x3f7,0x3f7,-1,1},
1045 ! {0x3f9,0x3f9,-1,-7},
1046 ! {0x3fa,0x3fa,-1,1},
1047 ! {0x3fd,0x3ff,1,-130},
1048 ! {0x400,0x40f,1,80},
1049 ! {0x410,0x42f,1,32},
1050 ! {0x460,0x480,2,1},
1051 ! {0x48a,0x4be,2,1},
1052 ! {0x4c0,0x4c0,-1,15},
1053 ! {0x4c1,0x4cd,2,1},
1054 ! {0x4d0,0x524,2,1},
1055 ! {0x531,0x556,1,48},
1056 ! {0x10a0,0x10c5,1,7264},
1057 ! {0x1e00,0x1e94,2,1},
1058 ! {0x1e9b,0x1e9b,-1,-58},
1059 ! {0x1e9e,0x1e9e,-1,-7615},
1060 ! {0x1ea0,0x1efe,2,1},
1061 ! {0x1f08,0x1f0f,1,-8},
1062 ! {0x1f18,0x1f1d,1,-8},
1063 ! {0x1f28,0x1f2f,1,-8},
1064 ! {0x1f38,0x1f3f,1,-8},
1065 ! {0x1f48,0x1f4d,1,-8},
1066 ! {0x1f59,0x1f5f,2,-8},
1067 ! {0x1f68,0x1f6f,1,-8},
1068 ! {0x1f88,0x1f8f,1,-8},
1069 ! {0x1f98,0x1f9f,1,-8},
1070 ! {0x1fa8,0x1faf,1,-8},
1071 ! {0x1fb8,0x1fb9,1,-8},
1072 ! {0x1fba,0x1fbb,1,-74},
1073 ! {0x1fbc,0x1fbc,-1,-9},
1074 ! {0x1fbe,0x1fbe,-1,-7173},
1075 ! {0x1fc8,0x1fcb,1,-86},
1076 ! {0x1fcc,0x1fcc,-1,-9},
1077 ! {0x1fd8,0x1fd9,1,-8},
1078 ! {0x1fda,0x1fdb,1,-100},
1079 ! {0x1fe8,0x1fe9,1,-8},
1080 ! {0x1fea,0x1feb,1,-112},
1081 ! {0x1fec,0x1fec,-1,-7},
1082 ! {0x1ff8,0x1ff9,1,-128},
1083 ! {0x1ffa,0x1ffb,1,-126},
1084 ! {0x1ffc,0x1ffc,-1,-9},
1085 ! {0x2126,0x2126,-1,-7517},
1086 ! {0x212a,0x212a,-1,-8383},
1087 ! {0x212b,0x212b,-1,-8262},
1088 ! {0x2132,0x2132,-1,28},
1089 ! {0x2160,0x216f,1,16},
1090 ! {0x2183,0x2183,-1,1},
1091 ! {0x24b6,0x24cf,1,26},
1092 ! {0x2c00,0x2c2e,1,48},
1093 ! {0x2c60,0x2c60,-1,1},
1094 ! {0x2c62,0x2c62,-1,-10743},
1095 ! {0x2c63,0x2c63,-1,-3814},
1096 ! {0x2c64,0x2c64,-1,-10727},
1097 ! {0x2c67,0x2c6b,2,1},
1098 ! {0x2c6d,0x2c6d,-1,-10780},
1099 ! {0x2c6e,0x2c6e,-1,-10749},
1100 ! {0x2c6f,0x2c6f,-1,-10783},
1101 ! {0x2c70,0x2c70,-1,-10782},
1102 ! {0x2c72,0x2c75,3,1},
1103 ! {0x2c7e,0x2c7f,1,-10815},
1104 ! {0x2c80,0x2ce2,2,1},
1105 ! {0x2ceb,0x2ced,2,1},
1106 ! {0xa640,0xa65e,2,1},
1107 ! {0xa662,0xa66c,2,1},
1108 ! {0xa680,0xa696,2,1},
1109 ! {0xa722,0xa72e,2,1},
1110 ! {0xa732,0xa76e,2,1},
1111 ! {0xa779,0xa77b,2,1},
1112 ! {0xa77d,0xa77d,-1,-35332},
1113 ! {0xa77e,0xa786,2,1},
1114 ! {0xa78b,0xa78b,-1,1},
1115 ! {0xff21,0xff3a,1,32},
1116 {0x10400,0x10427,1,40}
1121 return utf_convert(a, foldCase, sizeof(foldCase));
1125 - * The following tables are built by upperLowerExtract.pl < UnicodeData.txt .
1126 - * They must be in numeric order, because we use binary search on them.
1127 - * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range
1128 - * from 0x41 to 0x5a inclusive, stepping by 1, are switched to lower (for
1129 - * example) by adding 32.
1131 static convertStruct toLower[] =
1133 ! {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32},
1134 ! {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1},
1135 ! {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121},
1136 ! {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1},
1137 ! {0x186,0x186,-1,206}, {0x187,0x187,-1,1}, {0x189,0x18a,1,205},
1138 ! {0x18b,0x18b,-1,1}, {0x18e,0x18e,-1,79}, {0x18f,0x18f,-1,202},
1139 ! {0x190,0x190,-1,203}, {0x191,0x191,-1,1}, {0x193,0x193,-1,205},
1140 ! {0x194,0x194,-1,207}, {0x196,0x196,-1,211}, {0x197,0x197,-1,209},
1141 ! {0x198,0x198,-1,1}, {0x19c,0x19c,-1,211}, {0x19d,0x19d,-1,213},
1142 ! {0x19f,0x19f,-1,214}, {0x1a0,0x1a4,2,1}, {0x1a6,0x1a6,-1,218},
1143 ! {0x1a7,0x1a7,-1,1}, {0x1a9,0x1a9,-1,218}, {0x1ac,0x1ac,-1,1},
1144 ! {0x1ae,0x1ae,-1,218}, {0x1af,0x1af,-1,1}, {0x1b1,0x1b2,1,217},
1145 ! {0x1b3,0x1b5,2,1}, {0x1b7,0x1b7,-1,219}, {0x1b8,0x1bc,4,1},
1146 ! {0x1c4,0x1ca,3,2}, {0x1cd,0x1db,2,1}, {0x1de,0x1ee,2,1},
1147 ! {0x1f1,0x1f1,-1,2}, {0x1f4,0x1f4,-1,1}, {0x1f6,0x1f6,-1,-97},
1148 ! {0x1f7,0x1f7,-1,-56}, {0x1f8,0x21e,2,1}, {0x220,0x220,-1,-130},
1149 ! {0x222,0x232,2,1}, {0x386,0x386,-1,38}, {0x388,0x38a,1,37},
1150 ! {0x38c,0x38c,-1,64}, {0x38e,0x38f,1,63}, {0x391,0x3a1,1,32},
1151 ! {0x3a3,0x3ab,1,32}, {0x3d8,0x3ee,2,1}, {0x3f4,0x3f4,-1,-60},
1152 ! {0x3f7,0x3f7,-1,1}, {0x3f9,0x3f9,-1,-7}, {0x3fa,0x3fa,-1,1},
1153 ! {0x400,0x40f,1,80}, {0x410,0x42f,1,32}, {0x460,0x480,2,1},
1154 ! {0x48a,0x4be,2,1}, {0x4c1,0x4cd,2,1}, {0x4d0,0x4f4,2,1},
1155 ! {0x4f8,0x500,8,1}, {0x502,0x50e,2,1}, {0x531,0x556,1,48},
1156 ! {0x1e00,0x1e94,2,1}, {0x1ea0,0x1ef8,2,1}, {0x1f08,0x1f0f,1,-8},
1157 ! {0x1f18,0x1f1d,1,-8}, {0x1f28,0x1f2f,1,-8}, {0x1f38,0x1f3f,1,-8},
1158 ! {0x1f48,0x1f4d,1,-8}, {0x1f59,0x1f5f,2,-8}, {0x1f68,0x1f6f,1,-8},
1159 ! {0x1fb8,0x1fb9,1,-8}, {0x1fba,0x1fbb,1,-74}, {0x1fc8,0x1fcb,1,-86},
1160 ! {0x1fd8,0x1fd9,1,-8}, {0x1fda,0x1fdb,1,-100}, {0x1fe8,0x1fe9,1,-8},
1161 ! {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128},
1162 ! {0x1ffa,0x1ffb,1,-126}, {0x2126,0x2126,-1,-7517}, {0x212a,0x212a,-1,-8383},
1163 ! {0x212b,0x212b,-1,-8262}, {0xff21,0xff3a,1,32}, {0x10400,0x10427,1,40}
1166 static convertStruct toUpper[] =
1168 ! {0x61,0x7a,1,-32}, {0xb5,0xb5,-1,743}, {0xe0,0xf6,1,-32},
1169 ! {0xf8,0xfe,1,-32}, {0xff,0xff,-1,121}, {0x101,0x12f,2,-1},
1170 ! {0x131,0x131,-1,-232}, {0x133,0x137,2,-1}, {0x13a,0x148,2,-1},
1171 ! {0x14b,0x177,2,-1}, {0x17a,0x17e,2,-1}, {0x17f,0x17f,-1,-300},
1172 ! {0x183,0x185,2,-1}, {0x188,0x18c,4,-1}, {0x192,0x192,-1,-1},
1173 ! {0x195,0x195,-1,97}, {0x199,0x199,-1,-1}, {0x19e,0x19e,-1,130},
1174 ! {0x1a1,0x1a5,2,-1}, {0x1a8,0x1ad,5,-1}, {0x1b0,0x1b4,4,-1},
1175 ! {0x1b6,0x1b9,3,-1}, {0x1bd,0x1bd,-1,-1}, {0x1bf,0x1bf,-1,56},
1176 ! {0x1c5,0x1c6,1,-1}, {0x1c8,0x1c9,1,-1}, {0x1cb,0x1cc,1,-1},
1177 ! {0x1ce,0x1dc,2,-1}, {0x1dd,0x1dd,-1,-79}, {0x1df,0x1ef,2,-1},
1178 ! {0x1f2,0x1f3,1,-1}, {0x1f5,0x1f9,4,-1}, {0x1fb,0x21f,2,-1},
1179 ! {0x223,0x233,2,-1}, {0x253,0x253,-1,-210}, {0x254,0x254,-1,-206},
1180 ! {0x256,0x257,1,-205}, {0x259,0x259,-1,-202}, {0x25b,0x25b,-1,-203},
1181 ! {0x260,0x260,-1,-205}, {0x263,0x263,-1,-207}, {0x268,0x268,-1,-209},
1182 ! {0x269,0x26f,6,-211}, {0x272,0x272,-1,-213}, {0x275,0x275,-1,-214},
1183 ! {0x280,0x283,3,-218}, {0x288,0x288,-1,-218}, {0x28a,0x28b,1,-217},
1184 ! {0x292,0x292,-1,-219}, {0x3ac,0x3ac,-1,-38}, {0x3ad,0x3af,1,-37},
1185 ! {0x3b1,0x3c1,1,-32}, {0x3c2,0x3c2,-1,-31}, {0x3c3,0x3cb,1,-32},
1186 ! {0x3cc,0x3cc,-1,-64}, {0x3cd,0x3ce,1,-63}, {0x3d0,0x3d0,-1,-62},
1187 ! {0x3d1,0x3d1,-1,-57}, {0x3d5,0x3d5,-1,-47}, {0x3d6,0x3d6,-1,-54},
1188 ! {0x3d9,0x3ef,2,-1}, {0x3f0,0x3f0,-1,-86}, {0x3f1,0x3f1,-1,-80},
1189 ! {0x3f2,0x3f2,-1,7}, {0x3f5,0x3f5,-1,-96}, {0x3f8,0x3fb,3,-1},
1190 ! {0x430,0x44f,1,-32}, {0x450,0x45f,1,-80}, {0x461,0x481,2,-1},
1191 ! {0x48b,0x4bf,2,-1}, {0x4c2,0x4ce,2,-1}, {0x4d1,0x4f5,2,-1},
1192 ! {0x4f9,0x501,8,-1}, {0x503,0x50f,2,-1}, {0x561,0x586,1,-48},
1193 ! {0x1e01,0x1e95,2,-1}, {0x1e9b,0x1e9b,-1,-59}, {0x1ea1,0x1ef9,2,-1},
1194 ! {0x1f00,0x1f07,1,8}, {0x1f10,0x1f15,1,8}, {0x1f20,0x1f27,1,8},
1195 ! {0x1f30,0x1f37,1,8}, {0x1f40,0x1f45,1,8}, {0x1f51,0x1f57,2,8},
1196 ! {0x1f60,0x1f67,1,8}, {0x1f70,0x1f71,1,74}, {0x1f72,0x1f75,1,86},
1197 ! {0x1f76,0x1f77,1,100}, {0x1f78,0x1f79,1,128}, {0x1f7a,0x1f7b,1,112},
1198 ! {0x1f7c,0x1f7d,1,126}, {0x1f80,0x1f87,1,8}, {0x1f90,0x1f97,1,8},
1199 ! {0x1fa0,0x1fa7,1,8}, {0x1fb0,0x1fb1,1,8}, {0x1fb3,0x1fb3,-1,9},
1200 ! {0x1fbe,0x1fbe,-1,-7205}, {0x1fc3,0x1fc3,-1,9}, {0x1fd0,0x1fd1,1,8},
1201 ! {0x1fe0,0x1fe1,1,8}, {0x1fe5,0x1fe5,-1,7}, {0x1ff3,0x1ff3,-1,9},
1202 ! {0xff41,0xff5a,1,-32}, {0x10428,0x1044f,1,-40}
1207 return utf_convert(a, foldCase, sizeof(foldCase));
1210 static convertStruct toLower[] =
1215 ! {0x100,0x12e,2,1},
1216 ! {0x130,0x130,-1,-199},
1217 ! {0x132,0x136,2,1},
1218 ! {0x139,0x147,2,1},
1219 ! {0x14a,0x176,2,1},
1220 ! {0x178,0x178,-1,-121},
1221 ! {0x179,0x17d,2,1},
1222 ! {0x181,0x181,-1,210},
1223 ! {0x182,0x184,2,1},
1224 ! {0x186,0x186,-1,206},
1225 ! {0x187,0x187,-1,1},
1226 ! {0x189,0x18a,1,205},
1227 ! {0x18b,0x18b,-1,1},
1228 ! {0x18e,0x18e,-1,79},
1229 ! {0x18f,0x18f,-1,202},
1230 ! {0x190,0x190,-1,203},
1231 ! {0x191,0x191,-1,1},
1232 ! {0x193,0x193,-1,205},
1233 ! {0x194,0x194,-1,207},
1234 ! {0x196,0x196,-1,211},
1235 ! {0x197,0x197,-1,209},
1236 ! {0x198,0x198,-1,1},
1237 ! {0x19c,0x19c,-1,211},
1238 ! {0x19d,0x19d,-1,213},
1239 ! {0x19f,0x19f,-1,214},
1240 ! {0x1a0,0x1a4,2,1},
1241 ! {0x1a6,0x1a6,-1,218},
1242 ! {0x1a7,0x1a7,-1,1},
1243 ! {0x1a9,0x1a9,-1,218},
1244 ! {0x1ac,0x1ac,-1,1},
1245 ! {0x1ae,0x1ae,-1,218},
1246 ! {0x1af,0x1af,-1,1},
1247 ! {0x1b1,0x1b2,1,217},
1248 ! {0x1b3,0x1b5,2,1},
1249 ! {0x1b7,0x1b7,-1,219},
1250 ! {0x1b8,0x1bc,4,1},
1251 ! {0x1c4,0x1c4,-1,2},
1252 ! {0x1c5,0x1c5,-1,1},
1253 ! {0x1c7,0x1c7,-1,2},
1254 ! {0x1c8,0x1c8,-1,1},
1255 ! {0x1ca,0x1ca,-1,2},
1256 ! {0x1cb,0x1db,2,1},
1257 ! {0x1de,0x1ee,2,1},
1258 ! {0x1f1,0x1f1,-1,2},
1259 ! {0x1f2,0x1f4,2,1},
1260 ! {0x1f6,0x1f6,-1,-97},
1261 ! {0x1f7,0x1f7,-1,-56},
1262 ! {0x1f8,0x21e,2,1},
1263 ! {0x220,0x220,-1,-130},
1264 ! {0x222,0x232,2,1},
1265 ! {0x23a,0x23a,-1,10795},
1266 ! {0x23b,0x23b,-1,1},
1267 ! {0x23d,0x23d,-1,-163},
1268 ! {0x23e,0x23e,-1,10792},
1269 ! {0x241,0x241,-1,1},
1270 ! {0x243,0x243,-1,-195},
1271 ! {0x244,0x244,-1,69},
1272 ! {0x245,0x245,-1,71},
1273 ! {0x246,0x24e,2,1},
1274 ! {0x370,0x372,2,1},
1275 ! {0x376,0x376,-1,1},
1276 ! {0x386,0x386,-1,38},
1277 ! {0x388,0x38a,1,37},
1278 ! {0x38c,0x38c,-1,64},
1279 ! {0x38e,0x38f,1,63},
1280 ! {0x391,0x3a1,1,32},
1281 ! {0x3a3,0x3ab,1,32},
1282 ! {0x3cf,0x3cf,-1,8},
1283 ! {0x3d8,0x3ee,2,1},
1284 ! {0x3f4,0x3f4,-1,-60},
1285 ! {0x3f7,0x3f7,-1,1},
1286 ! {0x3f9,0x3f9,-1,-7},
1287 ! {0x3fa,0x3fa,-1,1},
1288 ! {0x3fd,0x3ff,1,-130},
1289 ! {0x400,0x40f,1,80},
1290 ! {0x410,0x42f,1,32},
1291 ! {0x460,0x480,2,1},
1292 ! {0x48a,0x4be,2,1},
1293 ! {0x4c0,0x4c0,-1,15},
1294 ! {0x4c1,0x4cd,2,1},
1295 ! {0x4d0,0x524,2,1},
1296 ! {0x531,0x556,1,48},
1297 ! {0x10a0,0x10c5,1,7264},
1298 ! {0x1e00,0x1e94,2,1},
1299 ! {0x1e9e,0x1e9e,-1,-7615},
1300 ! {0x1ea0,0x1efe,2,1},
1301 ! {0x1f08,0x1f0f,1,-8},
1302 ! {0x1f18,0x1f1d,1,-8},
1303 ! {0x1f28,0x1f2f,1,-8},
1304 ! {0x1f38,0x1f3f,1,-8},
1305 ! {0x1f48,0x1f4d,1,-8},
1306 ! {0x1f59,0x1f5f,2,-8},
1307 ! {0x1f68,0x1f6f,1,-8},
1308 ! {0x1f88,0x1f8f,1,-8},
1309 ! {0x1f98,0x1f9f,1,-8},
1310 ! {0x1fa8,0x1faf,1,-8},
1311 ! {0x1fb8,0x1fb9,1,-8},
1312 ! {0x1fba,0x1fbb,1,-74},
1313 ! {0x1fbc,0x1fbc,-1,-9},
1314 ! {0x1fc8,0x1fcb,1,-86},
1315 ! {0x1fcc,0x1fcc,-1,-9},
1316 ! {0x1fd8,0x1fd9,1,-8},
1317 ! {0x1fda,0x1fdb,1,-100},
1318 ! {0x1fe8,0x1fe9,1,-8},
1319 ! {0x1fea,0x1feb,1,-112},
1320 ! {0x1fec,0x1fec,-1,-7},
1321 ! {0x1ff8,0x1ff9,1,-128},
1322 ! {0x1ffa,0x1ffb,1,-126},
1323 ! {0x1ffc,0x1ffc,-1,-9},
1324 ! {0x2126,0x2126,-1,-7517},
1325 ! {0x212a,0x212a,-1,-8383},
1326 ! {0x212b,0x212b,-1,-8262},
1327 ! {0x2132,0x2132,-1,28},
1328 ! {0x2160,0x216f,1,16},
1329 ! {0x2183,0x2183,-1,1},
1330 ! {0x24b6,0x24cf,1,26},
1331 ! {0x2c00,0x2c2e,1,48},
1332 ! {0x2c60,0x2c60,-1,1},
1333 ! {0x2c62,0x2c62,-1,-10743},
1334 ! {0x2c63,0x2c63,-1,-3814},
1335 ! {0x2c64,0x2c64,-1,-10727},
1336 ! {0x2c67,0x2c6b,2,1},
1337 ! {0x2c6d,0x2c6d,-1,-10780},
1338 ! {0x2c6e,0x2c6e,-1,-10749},
1339 ! {0x2c6f,0x2c6f,-1,-10783},
1340 ! {0x2c70,0x2c70,-1,-10782},
1341 ! {0x2c72,0x2c75,3,1},
1342 ! {0x2c7e,0x2c7f,1,-10815},
1343 ! {0x2c80,0x2ce2,2,1},
1344 ! {0x2ceb,0x2ced,2,1},
1345 ! {0xa640,0xa65e,2,1},
1346 ! {0xa662,0xa66c,2,1},
1347 ! {0xa680,0xa696,2,1},
1348 ! {0xa722,0xa72e,2,1},
1349 ! {0xa732,0xa76e,2,1},
1350 ! {0xa779,0xa77b,2,1},
1351 ! {0xa77d,0xa77d,-1,-35332},
1352 ! {0xa77e,0xa786,2,1},
1353 ! {0xa78b,0xa78b,-1,1},
1354 ! {0xff21,0xff3a,1,32},
1355 ! {0x10400,0x10427,1,40}
1358 static convertStruct toUpper[] =
1360 ! {0x61,0x7a,1,-32},
1361 ! {0xb5,0xb5,-1,743},
1362 ! {0xe0,0xf6,1,-32},
1363 ! {0xf8,0xfe,1,-32},
1364 ! {0xff,0xff,-1,121},
1365 ! {0x101,0x12f,2,-1},
1366 ! {0x131,0x131,-1,-232},
1367 ! {0x133,0x137,2,-1},
1368 ! {0x13a,0x148,2,-1},
1369 ! {0x14b,0x177,2,-1},
1370 ! {0x17a,0x17e,2,-1},
1371 ! {0x17f,0x17f,-1,-300},
1372 ! {0x180,0x180,-1,195},
1373 ! {0x183,0x185,2,-1},
1374 ! {0x188,0x18c,4,-1},
1375 ! {0x192,0x192,-1,-1},
1376 ! {0x195,0x195,-1,97},
1377 ! {0x199,0x199,-1,-1},
1378 ! {0x19a,0x19a,-1,163},
1379 ! {0x19e,0x19e,-1,130},
1380 ! {0x1a1,0x1a5,2,-1},
1381 ! {0x1a8,0x1ad,5,-1},
1382 ! {0x1b0,0x1b4,4,-1},
1383 ! {0x1b6,0x1b9,3,-1},
1384 ! {0x1bd,0x1bd,-1,-1},
1385 ! {0x1bf,0x1bf,-1,56},
1386 ! {0x1c5,0x1c5,-1,-1},
1387 ! {0x1c6,0x1c6,-1,-2},
1388 ! {0x1c8,0x1c8,-1,-1},
1389 ! {0x1c9,0x1c9,-1,-2},
1390 ! {0x1cb,0x1cb,-1,-1},
1391 ! {0x1cc,0x1cc,-1,-2},
1392 ! {0x1ce,0x1dc,2,-1},
1393 ! {0x1dd,0x1dd,-1,-79},
1394 ! {0x1df,0x1ef,2,-1},
1395 ! {0x1f2,0x1f2,-1,-1},
1396 ! {0x1f3,0x1f3,-1,-2},
1397 ! {0x1f5,0x1f9,4,-1},
1398 ! {0x1fb,0x21f,2,-1},
1399 ! {0x223,0x233,2,-1},
1400 ! {0x23c,0x23c,-1,-1},
1401 ! {0x23f,0x240,1,10815},
1402 ! {0x242,0x247,5,-1},
1403 ! {0x249,0x24f,2,-1},
1404 ! {0x250,0x250,-1,10783},
1405 ! {0x251,0x251,-1,10780},
1406 ! {0x252,0x252,-1,10782},
1407 ! {0x253,0x253,-1,-210},
1408 ! {0x254,0x254,-1,-206},
1409 ! {0x256,0x257,1,-205},
1410 ! {0x259,0x259,-1,-202},
1411 ! {0x25b,0x25b,-1,-203},
1412 ! {0x260,0x260,-1,-205},
1413 ! {0x263,0x263,-1,-207},
1414 ! {0x268,0x268,-1,-209},
1415 ! {0x269,0x269,-1,-211},
1416 ! {0x26b,0x26b,-1,10743},
1417 ! {0x26f,0x26f,-1,-211},
1418 ! {0x271,0x271,-1,10749},
1419 ! {0x272,0x272,-1,-213},
1420 ! {0x275,0x275,-1,-214},
1421 ! {0x27d,0x27d,-1,10727},
1422 ! {0x280,0x283,3,-218},
1423 ! {0x288,0x288,-1,-218},
1424 ! {0x289,0x289,-1,-69},
1425 ! {0x28a,0x28b,1,-217},
1426 ! {0x28c,0x28c,-1,-71},
1427 ! {0x292,0x292,-1,-219},
1428 ! {0x345,0x345,-1,84},
1429 ! {0x371,0x373,2,-1},
1430 ! {0x377,0x377,-1,-1},
1431 ! {0x37b,0x37d,1,130},
1432 ! {0x3ac,0x3ac,-1,-38},
1433 ! {0x3ad,0x3af,1,-37},
1434 ! {0x3b1,0x3c1,1,-32},
1435 ! {0x3c2,0x3c2,-1,-31},
1436 ! {0x3c3,0x3cb,1,-32},
1437 ! {0x3cc,0x3cc,-1,-64},
1438 ! {0x3cd,0x3ce,1,-63},
1439 ! {0x3d0,0x3d0,-1,-62},
1440 ! {0x3d1,0x3d1,-1,-57},
1441 ! {0x3d5,0x3d5,-1,-47},
1442 ! {0x3d6,0x3d6,-1,-54},
1443 ! {0x3d7,0x3d7,-1,-8},
1444 ! {0x3d9,0x3ef,2,-1},
1445 ! {0x3f0,0x3f0,-1,-86},
1446 ! {0x3f1,0x3f1,-1,-80},
1447 ! {0x3f2,0x3f2,-1,7},
1448 ! {0x3f5,0x3f5,-1,-96},
1449 ! {0x3f8,0x3fb,3,-1},
1450 ! {0x430,0x44f,1,-32},
1451 ! {0x450,0x45f,1,-80},
1452 ! {0x461,0x481,2,-1},
1453 ! {0x48b,0x4bf,2,-1},
1454 ! {0x4c2,0x4ce,2,-1},
1455 ! {0x4cf,0x4cf,-1,-15},
1456 ! {0x4d1,0x525,2,-1},
1457 ! {0x561,0x586,1,-48},
1458 ! {0x1d79,0x1d79,-1,35332},
1459 ! {0x1d7d,0x1d7d,-1,3814},
1460 ! {0x1e01,0x1e95,2,-1},
1461 ! {0x1e9b,0x1e9b,-1,-59},
1462 ! {0x1ea1,0x1eff,2,-1},
1463 ! {0x1f00,0x1f07,1,8},
1464 ! {0x1f10,0x1f15,1,8},
1465 ! {0x1f20,0x1f27,1,8},
1466 ! {0x1f30,0x1f37,1,8},
1467 ! {0x1f40,0x1f45,1,8},
1468 ! {0x1f51,0x1f57,2,8},
1469 ! {0x1f60,0x1f67,1,8},
1470 ! {0x1f70,0x1f71,1,74},
1471 ! {0x1f72,0x1f75,1,86},
1472 ! {0x1f76,0x1f77,1,100},
1473 ! {0x1f78,0x1f79,1,128},
1474 ! {0x1f7a,0x1f7b,1,112},
1475 ! {0x1f7c,0x1f7d,1,126},
1476 ! {0x1f80,0x1f87,1,8},
1477 ! {0x1f90,0x1f97,1,8},
1478 ! {0x1fa0,0x1fa7,1,8},
1479 ! {0x1fb0,0x1fb1,1,8},
1480 ! {0x1fb3,0x1fb3,-1,9},
1481 ! {0x1fbe,0x1fbe,-1,-7205},
1482 ! {0x1fc3,0x1fc3,-1,9},
1483 ! {0x1fd0,0x1fd1,1,8},
1484 ! {0x1fe0,0x1fe1,1,8},
1485 ! {0x1fe5,0x1fe5,-1,7},
1486 ! {0x1ff3,0x1ff3,-1,9},
1487 ! {0x214e,0x214e,-1,-28},
1488 ! {0x2170,0x217f,1,-16},
1489 ! {0x2184,0x2184,-1,-1},
1490 ! {0x24d0,0x24e9,1,-26},
1491 ! {0x2c30,0x2c5e,1,-48},
1492 ! {0x2c61,0x2c61,-1,-1},
1493 ! {0x2c65,0x2c65,-1,-10795},
1494 ! {0x2c66,0x2c66,-1,-10792},
1495 ! {0x2c68,0x2c6c,2,-1},
1496 ! {0x2c73,0x2c76,3,-1},
1497 ! {0x2c81,0x2ce3,2,-1},
1498 ! {0x2cec,0x2cee,2,-1},
1499 ! {0x2d00,0x2d25,1,-7264},
1500 ! {0xa641,0xa65f,2,-1},
1501 ! {0xa663,0xa66d,2,-1},
1502 ! {0xa681,0xa697,2,-1},
1503 ! {0xa723,0xa72f,2,-1},
1504 ! {0xa733,0xa76f,2,-1},
1505 ! {0xa77a,0xa77c,2,-1},
1506 ! {0xa77f,0xa787,2,-1},
1507 ! {0xa78c,0xa78c,-1,-1},
1508 ! {0xff41,0xff5a,1,-32},
1509 ! {0x10428,0x1044f,1,-40}
1513 *** ../vim-7.2.329/src/version.c 2010-01-12 15:42:03.000000000 +0100
1514 --- src/version.c 2010-01-12 18:16:55.000000000 +0100
1518 { /* Add new patch number below this line */
1524 From "know your smileys":
1526 <|-( Chinese and doesn't like these kind of jokes
1528 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
1529 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1530 \\\ download, build and distribute -- http://www.A-A-P.org ///
1531 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///