From 5eb5e3456f905442d5eba0150fc1ff92e53a499b Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 29 Mar 2015 20:24:10 +0200 Subject: [PATCH] digraphs: allow proposals by decimal code point escape --- shiar.inc.txt | 10 +++++----- tools/mkdigraphs-shiar | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/shiar.inc.txt b/shiar.inc.txt index 30f81b8..2b2abd0 100644 --- a/shiar.inc.txt +++ b/shiar.inc.txt @@ -635,11 +635,11 @@ EK ㅖ 0A ٠ # common formatting control -ZS ​ # ZWSP; capitals like other Cc -ZN ‌ # ZWNJ; less obvious alt: 'Z -ZW ‍ # ZWJ; ZJ somewhy used for tsadi; less obvious alt: "Z -LR ‎ # LRM -RL ‏ # RLM; keep rl for ɼ +ZS \8203 # ZWSP; capitals like other Cc +ZN \8204 # ZWNJ; less obvious alt: 'Z +ZW \8205 # ZWJ; ZJ somewhy used for tsadi; less obvious alt: "Z +LR \8206 # LRM +RL \8207 # RLM; keep rl for ɼ ### # under development or temporary diff --git a/tools/mkdigraphs-shiar b/tools/mkdigraphs-shiar index 05399b0..443de5d 100755 --- a/tools/mkdigraphs-shiar +++ b/tools/mkdigraphs-shiar @@ -4,7 +4,7 @@ use strict; use warnings; use open IN => ':utf8', ':std'; -our $VERSION = '1.01'; +our $VERSION = '1.02'; my $di = do "data/digraphs-rfc.inc.pl" or warn "official digraphs not included for comparison: ", $@ // $!; @@ -12,9 +12,9 @@ my $di = do "data/digraphs-rfc.inc.pl" say "# automatically generated by $0"; say '+{'; for (readline) { - my ($mnem, $chr) = m{^([!"%'-Z_a-z]{2}) (.)} or next; + my ($mnem, $cp, $chr) = m{^([!"%'-Z_a-z]{2}) (?:(\\\d+)|(.))} or next; warn("$mnem already defined"), next if defined $di->{$mnem}; - my $chrstr = sprintf '"\x{%x}"', ord $chr; + my $chrstr = sprintf '"\x{%x}"', $cp // ord $chr; say "q{$mnem} => $chrstr,"; } say '}'; -- 2.30.0