OLD | NEW |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # References: | 6 # References: |
7 # http://encoding.spec.whatwg.org/#shift_jis | 7 # http://encoding.spec.whatwg.org/#shift_jis |
8 | 8 |
9 # Download the following file, run it in source/data/mappings directory | 9 # Download the following file, run it in source/data/mappings directory |
10 # and save the result to euc-jp-html5.ucm | 10 # and save the result to euc-jp-html5.ucm |
11 # http://encoding.spec.whatwg.org/index-jis0208.txt | 11 # http://encoding.spec.whatwg.org/index-jis0208.txt |
12 | 12 |
13 function preamble { | 13 function preamble { |
14 cat <<PREAMBLE | 14 cat <<PREAMBLE |
15 # *************************************************************************** | 15 # *************************************************************************** |
16 # * | 16 # * |
17 # * Copyright (C) 1995-2014, International Business Machines | 17 # * Copyright (C) 1995-2014, International Business Machines |
18 # * Corporation and others. All Rights Reserved. | 18 # * Corporation and others. All Rights Reserved. |
19 # * | 19 # * |
20 # * Generated per the algorithm for Shift_JIS | 20 # * Generated per the algorithm for Shift_JIS |
21 # * described at http://encoding.spec.whatwg.org/#shift_jis | 21 # * described at http://encoding.spec.whatwg.org/#shift_jis |
22 # * | 22 # * |
23 # *************************************************************************** | 23 # *************************************************************************** |
24 <code_set_name> "shift_jis-html5" | 24 <code_set_name> "shift_jis-html5" |
25 <char_name_mask> "AXXXX" | 25 <char_name_mask> "AXXXX" |
26 <mb_cur_max> 2 | 26 <mb_cur_max> 2 |
27 <mb_cur_min> 1 | 27 <mb_cur_min> 1 |
28 <uconv_class> "MBCS" | 28 <uconv_class> "MBCS" |
29 <subchar> \xFC\xFC | 29 <subchar> \x3F |
30 <subchar1> \x7F | |
31 <icu:charsetFamily> "ASCII" | 30 <icu:charsetFamily> "ASCII" |
32 | 31 |
33 <icu:state> 0-80, 81-9f:1, a1-df, e0-fc:1 | 32 <icu:state> 0-80, 81-9f:1, a1-df, e0-fc:1, 82:3, 84:4, 85-86:2 , 87:5, 88:2, 98:6, eb-ec:2, ef:2, f9:2, fc:7 |
33 | |
34 <icu:state> 40-7e, 80-fc | 34 <icu:state> 40-7e, 80-fc |
35 <icu:state> 80-fc | |
36 <icu:state> 4f-7e, 80-fc, 59-5f.i, 7a-7e.i | |
37 <icu:state> 40-7e, 80-fc, 61-6f.i | |
38 <icu:state> 40-7e, 80-fc, 76-7d.i | |
39 <icu:state> 40-7e, 80-fc, 73-7e.i | |
40 <icu:state> 40-4b, 80-fc | |
41 | |
35 | 42 |
36 CHARMAP | 43 CHARMAP |
37 PREAMBLE | 44 PREAMBLE |
38 } | 45 } |
39 | 46 |
40 # The encoding spec for Shift_JIS says U+0080 has to be round-tripped with | 47 # The encoding spec for Shift_JIS says U+0080 has to be round-tripped with |
41 # 0x80. So, this is one character more than ASCII up to 128 (0x80). | 48 # 0x80. So, this is one character more than ASCII up to 128 (0x80). |
42 function ascii { | 49 function ascii { |
43 for i in $(seq 0 128) | 50 for i in $(seq 0 128) |
44 do | 51 do |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 function unsorted_table { | 117 function unsorted_table { |
111 ascii | 118 ascii |
112 half_width_kana | 119 half_width_kana |
113 jis208 | 120 jis208 |
114 eudc "0x40" "0x7E" "0x40" | 121 eudc "0x40" "0x7E" "0x40" |
115 eudc "0x80" "0xFC" "0x41" | 122 eudc "0x80" "0xFC" "0x41" |
116 echo '<U00A5> \x5C |1' | 123 echo '<U00A5> \x5C |1' |
117 echo '<U203E> \x7E |1' | 124 echo '<U203E> \x7E |1' |
118 } | 125 } |
119 | 126 |
127 wget -N -r -nd http://encoding.spec.whatwg.org/index-jis0208.txt | |
jsbell
2015/03/18 21:38:31
https
| |
120 preamble | 128 preamble |
121 unsorted_table | sort | uniq | 129 unsorted_table | sort | uniq |
122 echo 'END CHARMAP' | 130 echo 'END CHARMAP' |
OLD | NEW |