libwc/map/mk_big5_txt.pl
raw| 1 | |
| 2 | # gunzip -c xcin.linux.org.tw/pub/xcin/i18n/charset/BIG5.gz \ |
| 3 | # | perl mk_big5_txt.pl \ |
| 4 | # > private/big5.txt |
| 5 | |
| 6 | while(<>) { |
| 7 | s/^%IRREVERSIBLE%//; |
| 8 | s/^<U([0-9A-F]{4})\>\s+\/x([0-9a-f]{2})\/x([0-9a-f]{2})\s+// || next; |
| 9 | ($c, $u) = ("$2$3", $1); |
| 10 | $c =~ tr/a-f/A-F/; |
| 11 | print "$c\t$u\n"; |
| 12 | } |