digraphs: describe rfc translation table
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 22 Feb 2015 19:28:31 +0000 (20:28 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:42 +0000 (05:43 +0200)
tools/mkdigraphs-rfc

index 8db192c728971be8a5186827321e2a35090741b3..3e280a991db70867169867ec8810bf76019a710d 100755 (executable)
@@ -4,50 +4,57 @@ use strict;
 use warnings;
 use utf8;
 use open OUT => ':utf8', ':std';
+use charnames ':full';
 use Data::Dump 'pp';
 
 our $VERSION = '1.01';
 
 # translation table for deprecated code points
 my %replace = (
-       0xE001 => 0,  # join lines: not accepted
-       0xE004 => 0,  # umlaut is no different from diaeresis 0x0308
-       0xE005 => "\x{0344}", # discouraged
-       0xE006 => "\x{0300}",
-       0xE007 => "\x{0301}",
-       0xE008 => "\x{0302}",
-       0xE009 => "\x{0303}",
-       0xE00A => "\x{0304}",
-       0xE00B => "\x{0306}",
-       0xE00C => "\x{0307}",
-       0xE00D => "\x{0308}",
-       0xE00E => "\x{030A}",
-       0xE00F => "\x{030B}",
-       0xE010 => "\x{030C}",
-       0xE011 => "\x{0327}",
-       0xE012 => "\x{0328}",
-       0xE013 => "\x{0332}",
-       0xE014 => "\x{0333}",
-       0xE015 => "\x{0338}",
-       0xE016 => "\x{0345}",
-       0xE017 => "\x{0314}",
-       0xE018 => "\x{0313}",
-       0xE019 => "\x{1FFE}",
-       0xE01A => "\x{1FBF}",
-       0xE01B => "\x{03D0}",  # middle beta = curled beta?
-       0xE01C => "\x{25CB}",
-       0xE01D => "\x{0192}",
-       0xE01E => "\x{0292}",
-       0xE01F => "\x{33C2}",  # am, compatibility char
-       0xE020 => "\x{33D8}",  # pm, compatibility char
-       0xE021 => "\x{2121}",
-       0xE022 => "\x{FE8E}",
-       0xE023 => 0,  # dutch guilder 0192 is already encoded, and not very useful anyway
-       0xE024 => "\x{0393}",
-       0xE025 => "\x{20D7}",  # also 20D1; non-spacing
-       0xE026 => "\x{1FEF}",
-       0xE027 => "\x{1FC0}",
-       0xE028 => "J̌",  # uppercase U+01F0, no single character
+       (map {$_ => 0} 0xE000 .. 0xE03F),  # omit by default if unspecified
+       0xE001 => 0,  # /c join lines: not accepted
+       0xE002 => "\N{EM QUAD}",  # UA unit space A
+               #> ISO-IR 008-1: unit spaces A in position 4/0 and B in
+               #> position 6/0 are fixed length spaces whereby UA ≥ UB.
+               #> […] The lengths of UA and UB are determined by the user.
+       0xE003 => "\N{EN QUAD}",  # UB unit space B
+#      0xE004 => "\N{COMBINING DIAERESIS}",  # "3 combining umlaut, unified with diaeresis
+#      0xE005 => "\N{COMBINING GREEK DIALYTIKA TONOS}",  # "1 combining diaeresis+accent, unspecified
+       0xE006 => "\N{COMBINING GRAVE ACCENT}",  # "! combining grave
+       0xE007 => "\N{COMBINING ACUTE ACCENT}",  # "' combining acute
+       0xE008 => "\N{COMBINING CIRCUMFLEX ACCENT}",  # "> combining circumflex
+       0xE009 => "\N{COMBINING TILDE}",  # "? combining tilde
+       0xE00A => "\N{COMBINING MACRON}",  # "- combining macron
+       0xE00B => "\N{COMBINING BREVE}",  # "( combining breve
+       0xE00C => "\N{COMBINING DOT ABOVE}",  # ". combining dot above
+       0xE00D => "\N{COMBINING DIAERESIS}",  # ": combining diaeresis
+       0xE00E => "\N{COMBINING RING ABOVE}",  # "0 combining ring above
+       0xE00F => "\N{COMBINING DOUBLE ACUTE ACCENT}",  # "" combining double accute (sic)
+       0xE010 => "\N{COMBINING CARON}",  # "< combining caron
+       0xE011 => "\N{COMBINING CEDILLA}",  # ", combining cedilla
+       0xE012 => "\N{COMBINING OGONEK}",  # "; combining ogonek
+       0xE013 => "\N{COMBINING LOW LINE}",  # "_ combining low line
+       0xE014 => "\N{COMBINING DOUBLE LOW LINE}",  # "= combining double low line
+       0xE015 => "\N{COMBINING LONG SOLIDUS OVERLAY}",  # "/ combining long solidus
+       0xE016 => "\N{COMBINING GREEK YPOGEGRAMMENI}",  # "i combining greek iota below
+       0xE017 => "\N{COMBINING REVERSED COMMA ABOVE}",  # "d combining greek dasia pneumata
+       0xE018 => "\N{COMBINING COMMA ABOVE}",  # "p combining greek psili pneumata
+       0xE019 => "\N{GREEK DASIA}",  # ;; greek dasia pneumata
+       0xE01A => "\N{GREEK PSILI}",  # ,, greek psili pneumata
+       0xE01B => "\N{GREEK BETA SYMBOL}",  # b3 middle beta = curled beta?
+       0xE01C => "\N{WHITE CIRCLE}",  # Ci circle
+       0xE01D => "\N{LATIN SMALL LETTER F WITH HOOK}",  # f( function sign
+       0xE01E => "\N{LATIN SMALL LETTER EZH}",  # ed ezh
+       0xE01F => "\N{SQUARE AM}",  # am, compatibility char
+       0xE020 => "\N{SQUARE PM}",  # pm, compatibility char
+       0xE021 => "\N{TELEPHONE SIGN}",  # Tel, compatibility char
+       0xE022 => "\N{ARABIC LETTER ALEF FINAL FORM}",  # a+: final alef compatibility
+#      0xE023 => "\N{LATIN SMALL LETTER F WITH HOOK}",  # Fl dutch guilder, unified with function sign, obsolete
+#      0xE024 => "\N{GREEK CAPITAL LETTER GAMMA}",  # GF gamma function sign, unified with letter
+       0xE025 => "\N{COMBINING RIGHT ARROW ABOVE}",  # >V combining(?) rightwards vector above; also U+20D1
+       0xE026 => "\N{GREEK VARIA}",  # !* greek varia
+       0xE027 => "\N{GREEK PERISPOMENI}",  # ?* greek perispomeni
+       0xE028 => "J\N{COMBINING CARON}",  # J< J-caron = uppercase U+01F0, no single character
 );
 
 # expect input data source at command line