From: Jarkko Hietaniemi Date: Wed, 31 Oct 2001 13:25:02 +0000 (+0000) Subject: Doc tweaks. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4bdee82d7bc2074b4348e7a8af9486f836481a0a;p=p5sagit%2Fp5-mst-13.2.git Doc tweaks. p4raw-id: //depot/perl@12789 --- diff --git a/lib/encoding.pm b/lib/encoding.pm index e758687..be0fd73 100644 --- a/lib/encoding.pm +++ b/lib/encoding.pm @@ -23,13 +23,16 @@ encoding - pragma to control the conversion of legacy data into Unicode use encoding "iso 8859-7"; + # The \xDF of ISO 8859-7 is \x{3af} in Unicode. + $a = "\xDF"; $b = "\x{100}"; + printf "%#x\n", ord($a); # will print 0x3af, not 0xdf + $c = $a . $b; # $c will be "\x{3af}\x{100}", not "\x{df}\x{100}". - # The \xDF of ISO 8859-7 is \x{3af} in Unicode. =head1 DESCRIPTION @@ -40,6 +43,10 @@ encoding pragma you can change this default. The pragma is a per script, not a per block lexical. Only the last C matters, and it affects B. +If no encoding is specified, the environment variable L +is consulted. If no encoding can be found, C +error will be thrown. + =head1 FUTURE POSSIBILITIES The C<\x..> and C<\0...> in regular expressions are not @@ -56,7 +63,7 @@ You should not need C for anything else these days =head1 SEE ALSO -L +L, L =cut