summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-14 23:47:43 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-14 23:47:43 +0000
commit301a3cda5671e7e40a7f72349d8e1b22ffbeacfa (patch)
treebf86137233ccdbbb07b70202a44e48edace843fd /lib
parentba8639421c86ec71757a56d2fabcbfe5474d875d (diff)
downloadperl-301a3cda5671e7e40a7f72349d8e1b22ffbeacfa.tar.gz
Document and test the C0 and C1.
p4raw-id: //depot/perl@14699
Diffstat (limited to 'lib')
-rw-r--r--lib/charnames.pm7
-rw-r--r--lib/charnames.t17
2 files changed, 23 insertions, 1 deletions
diff --git a/lib/charnames.pm b/lib/charnames.pm
index 1297a76796..0241534250 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 e12b920f31..607f4f3790 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.