From: Jarkko Hietaniemi Date: Thu, 14 Feb 2002 23:47:43 +0000 (+0000) Subject: Document and test the C0 and C1. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=301a3cda5671e7e40a7f72349d8e1b22ffbeacfa;p=p5sagit%2Fp5-mst-13.2.git Document and test the C0 and C1. p4raw-id: //depot/perl@14699 --- diff --git a/lib/charnames.pm b/lib/charnames.pm index 1297a76..0241534 100644 --- a/lib/charnames.pm +++ b/lib/charnames.pm @@ -238,6 +238,13 @@ constant used inside double-quoted strings: in other words, you cannot use variables inside the C<\N{...}>. If you want similar run-time functionality, use charnames::vianame(). +For the C0 and C1 control characters (U+0000..U+001F, U+0080..U+009F) +as of Unicode 3.1, there are no official Unicode names but you can +use instead the ISO 6429 names (LINE FEED, ESCAPE, and so forth). +In Unicode 3.2 some naming changes will happen since ISO 6429 has been +updated. Also note that the U+UU80, U+0081, U+0084, and U+0099 +do not have names even in ISO 6429. + =head1 CUSTOM TRANSLATORS The mechanism of translation of C<\N{...}> escapes is general and not diff --git a/lib/charnames.t b/lib/charnames.t index e12b920..607f4f3 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -8,7 +8,7 @@ BEGIN { } $| = 1; -print "1..22\n"; +print "1..25\n"; use charnames ':full'; @@ -158,3 +158,18 @@ sub to_bytes { print "ok 22\n"; } + +print "not " unless "\N{HORIZONTAL TABULATION}" eq "\t"; +print "ok 23\n"; + +print "not " unless "\N{ESCAPE}" eq "\e"; +print "ok 24\n"; + +print "not " unless "\N{NULL}" eq "\c@"; +print "ok 25\n"; + +# TODO: when Unicode 3.2 comes along some names will change +# HORIZONTAL TABULATION -> CHARACTER TABULATION (since ISO 6429 +# has been updated), and some names will have shorter aliases +# LINEFEED (LF). Update the tests, and also update the charnames +# pragma to support the 3.1 names, and the shorter aliases.