From: Robert Spalek Date: Fri, 4 Jul 2003 12:26:26 +0000 (+0000) Subject: added a tool for importing mappings from ftp.unicode.org X-Git-Tag: holmes-import~1230 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e5bc3f75df3b1875a33b883c55fb9f1ffe8271c0;p=libucw.git added a tool for importing mappings from ftp.unicode.org I will rather use this source than `recode` --- diff --git a/charset/misc/trunicode b/charset/misc/trunicode new file mode 100755 index 00000000..73f5d371 --- /dev/null +++ b/charset/misc/trunicode @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +foreach $file (@ARGV) +{ + print "Converting $file\n"; + + open(fi, "<$file") || die; + open(fo, ">$file-tr") || die; + print fo "# $file charset file +# Imported from ftp://ftp.unicode.org/Public/MAPPINGS/$file +# (c) 2003, Robert Spalek + +"; + while () + { + next if /^#/; + chop; + ($code, $unicode, $comment) = /^0x(..)\t0x(....)\t#\t(.*)$/; + print fo "$code\t$unicode\t$comment\n"; + } + close(fo); + close(fi); +}