From 4fcbc23c1ce263d38973a5ba69dd471c2585050f Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 29 Dec 2003 00:38:59 +0000 Subject: [project @ 2003-12-29 00:38:59 by bursa] Transliterate Unicode to Latin1 using Markus Kuhn's transtab. svn path=/import/netsurf/; revision=465 --- utils/tt2code | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 utils/tt2code (limited to 'utils/tt2code') diff --git a/utils/tt2code b/utils/tt2code new file mode 100755 index 000000000..c4dc07820 --- /dev/null +++ b/utils/tt2code @@ -0,0 +1,51 @@ +#!/usr/bin/perl -W + +print <) { + chomp; + next if m/^%/; + next if m/^ *$/; + + m/^ /g or die "invalid line '$_'"; + $z = $1; + next if (hex($z) < 256); + + SUBST: while (m/\G"?(()*)"?;?/g) { + next if $& eq ''; + $m = $1; + if ($m eq '') { + print "case 0x$z: break;\n"; + next; + } + chop $m; + @s = split />