aboutsummaryrefslogtreecommitdiffstats
path: root/admin/charsets/mapconv
diff options
context:
space:
mode:
Diffstat (limited to 'admin/charsets/mapconv')
-rwxr-xr-xadmin/charsets/mapconv13
1 files changed, 6 insertions, 7 deletions
diff --git a/admin/charsets/mapconv b/admin/charsets/mapconv
index 4f7a8b96f54..8433d222b8d 100755
--- a/admin/charsets/mapconv
+++ b/admin/charsets/mapconv
@@ -98,18 +98,17 @@ elif [ "$3" = "GLIBC-2-7" ] ; then
98 | sed -e 's/xa/x2/g' -e 's/xb/x3/g' -e 's/xc/x4/g' \ 98 | sed -e 's/xa/x2/g' -e 's/xb/x3/g' -e 's/xc/x4/g' \
99 -e 's/xd/x5/g' -e 's/xe/x6/g' -e 's/xf/x7/g' \ 99 -e 's/xd/x5/g' -e 's/xe/x6/g' -e 's/xf/x7/g' \
100 -e 's,<U\([^>]*\)>[ ]*/x\(..\)/x\(..\).*,0x\2\3 0x\1,' \ 100 -e 's,<U\([^>]*\)>[ ]*/x\(..\)/x\(..\).*,0x\2\3 0x\1,' \
101 | tee temp \
102 | sort | ${AWKPROG} 101 | sort | ${AWKPROG}
103elif [ "$3" = "CZYBORRA" ] ; then 102elif [ "$3" = "CZYBORRA" ] ; then
104 # Source format is: 103 # Source format is:
105 # =XX U+YYYY 104 # =XX U+YYYY
106 zcat $1 | sed -n -e "$2 p" \ 105 sed -n -e "$2 p" < $1 \
107 | sed -e 's/=\(..\)[^U]*U+\([0-9A-F]*\).*/0x\1 0x\2/' \ 106 | sed -e 's/=\(..\)[^U]*U+\([0-9A-F]*\).*/0x\1 0x\2/' \
108 | sort | ${AWKPROG} 107 | sort | ${AWKPROG}
109elif [ "$3" = "IANA" ] ; then 108elif [ "$3" = "IANA" ] ; then
110 # Source format is: 109 # Source format is:
111 # 0xXX 0xYYYY 110 # 0xXX 0xYYYY
112 zcat $1 | sed -n -e "$2 p" \ 111 sed -n -e "$2 p" < $1 \
113 | sed -e 's/\(0x[0-9A-Fa-f]*\)[^0]*\(0x[0-9A-Fa-f]*\).*/\1 \2/' \ 112 | sed -e 's/\(0x[0-9A-Fa-f]*\)[^0]*\(0x[0-9A-Fa-f]*\).*/\1 \2/' \
114 | sort | ${AWKPROG} 113 | sort | ${AWKPROG}
115elif [ "$3" = "UNICODE" ] ; then 114elif [ "$3" = "UNICODE" ] ; then
@@ -117,25 +116,25 @@ elif [ "$3" = "UNICODE" ] ; then
117 # YYYY XX 116 # YYYY XX
118 # We perform reverse sort to prefer the first one in the 117 # We perform reverse sort to prefer the first one in the
119 # duplicated mappings (e.g. 0x20->U+0020, 0x20->U+00A0). 118 # duplicated mappings (e.g. 0x20->U+0020, 0x20->U+00A0).
120 zcat $1 | sed -n -e "$2 p" \ 119 sed -n -e "$2 p" < $1 \
121 | sed -e 's/\([0-9A-F]*\)[^0-9A-F]*\([0-9A-F]*\).*/0x\2 0x\1/' \ 120 | sed -e 's/\([0-9A-F]*\)[^0-9A-F]*\([0-9A-F]*\).*/0x\2 0x\1/' \
122 | sort -r 121 | sort -r
123elif [ "$3" = "UNICODE2" ] ; then 122elif [ "$3" = "UNICODE2" ] ; then
124 # Source format is: 123 # Source format is:
125 # 0xXXXX 0xYYYY # ... 124 # 0xXXXX 0xYYYY # ...
126 zcat $1 | sed -n -e "$2 p" \ 125 sed -n -e "$2 p" < $1 \
127 | sed -e 's/\([0-9A-Fx]*\)[^0]*\([0-9A-Fx]*\).*/\1 \2/' \ 126 | sed -e 's/\([0-9A-Fx]*\)[^0]*\([0-9A-Fx]*\).*/\1 \2/' \
128 | ${AWKPROG} | sort -n -k 4,4 127 | ${AWKPROG} | sort -n -k 4,4
129elif [ "$3" = "YASUOKA" ] ; then 128elif [ "$3" = "YASUOKA" ] ; then
130 # Source format is: 129 # Source format is:
131 # YYYY 0-XXXX (XXXX is a Kuten code) 130 # YYYY 0-XXXX (XXXX is a Kuten code)
132 zcat $1 | sed -n -e "$2 p" \ 131 sed -n -e "$2 p" < $1 \
133 | sed -e 's/\([0-9A-F]*\)[^0]*0-\([0-9]*\).*/0x\2 0x\1/' \ 132 | sed -e 's/\([0-9A-F]*\)[^0]*0-\([0-9]*\).*/0x\2 0x\1/' \
134 | sort | ${AWKPROG} 133 | sort | ${AWKPROG}
135elif [ "$3" = "KANJI-DATABASE" ] ; then 134elif [ "$3" = "KANJI-DATABASE" ] ; then
136 # Source format is: 135 # Source format is:
137 # C?-XXXX U+YYYYY ..... 136 # C?-XXXX U+YYYYY .....
138 zcat $1 | sed -n -e "$2 p" \ 137 sed -n -e "$2 p" < $1 \
139 | sed -e 's/...\(....\) U+\([0-9A-F]*\).*/0x\1 0x\2/' \ 138 | sed -e 's/...\(....\) U+\([0-9A-F]*\).*/0x\1 0x\2/' \
140 | sort | ${AWKPROG} 139 | sort | ${AWKPROG}
141else 140else