From: Jarkko Hietaniemi Date: Thu, 11 Apr 2002 19:19:36 +0000 (+0000) Subject: ZWNJ, ZWJ. Any further convenience aliasing should X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=24b5d5ccc3bc7535f387e48d7e29656751ae98a5;p=p5sagit%2Fp5-mst-13.2.git ZWNJ, ZWJ. Any further convenience aliasing should consider using the NamesList. p4raw-id: //depot/perl@15867 --- diff --git a/lib/charnames.pm b/lib/charnames.pm index 6cf46a5..3f69662 100644 --- a/lib/charnames.pm +++ b/lib/charnames.pm @@ -18,6 +18,11 @@ my %alias1 = ( 'FF' => 'FORM FEED (FF)', 'CR' => 'CARRIAGE RETURN (LF)', 'NEL' => 'NEXT LINE (NEL)', + # More convenience. For futher convencience, + # it is suggested some way using using the NamesList + # aliases is implemented. + 'ZWNJ' => 'ZERO WIDTH NON-JOINER', + 'ZWJ' => 'ZERO WIDTH JOINER', 'BOM' => 'BYTE ORDER MARK', ); @@ -379,7 +384,12 @@ One can also use BYTE ORDER MARK BOM -though that is of course not a legal character as such. +and + + ZWNJ + ZWJ + +for ZERO WIDTH NON-JOINER and ZERO WIDTH JOINER. For backward compatibility one can use the old names for certain C0 and C1 controls diff --git a/lib/charnames.t b/lib/charnames.t index 6a961c6..3c92d04 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -12,7 +12,7 @@ BEGIN { $| = 1; -print "1..39\n"; +print "1..41\n"; use charnames ':full'; @@ -226,3 +226,9 @@ print "ok 38\n"; print "ok 39\n"; } + +print "not " unless ord("\N{ZWNJ}") == 0x200C; +print "ok 40\n"; + +print "not " unless ord("\N{ZWJ}") == 0x200D; +print "ok 41\n";