From e5bc3f75df3b1875a33b883c55fb9f1ffe8271c0 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Fri, 4 Jul 2003 12:26:26 +0000 Subject: [PATCH] added a tool for importing mappings from ftp.unicode.org I will rather use this source than `recode` --- charset/misc/trunicode | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 charset/misc/trunicode 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); +} -- 2.39.5