From: Jarkko Hietaniemi Date: Mon, 10 Jun 2002 14:04:31 +0000 (+0000) Subject: Document the UTF-8 env issue. Now NI-S just needs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5b333639a8cab1a9958425f9730f6c2c21c77406;p=p5sagit%2Fp5-mst-13.2.git Document the UTF-8 env issue. Now NI-S just needs to fix binmode() to comply with the documentation... p4raw-id: //depot/perl@17168 --- diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 4b739dd..4d704f5 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -332,7 +332,26 @@ Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named for you since it's not UTF-8 what you will be getting but instead UTF-EBCDIC. See L, L, and http://www.unicode.org/unicode/reports/tr16/ for more information. -In future releases this naming may change. +In future releases this naming may change. See L +for more information about UTF-8. + +=item * + +If your environment variables (LC_ALL, LC_CTYPE, LANG, LANGUAGE) look +like you want to use UTF-8 (any of the the variables match C), +your STDIN, STDOUT, STDERR handles and the default open discipline +(see L) are marked as UTF-8. + +Note that after this Perl really does assume that everything is UTF-8: +for example if some input handle is not, Perl will probably very soon +complain about the input data like this "Malformed UTF-8 ..." since +any old eight-bit data is not legal UTF-8. + +Note for code authors: if you want to enable your users to use UTF-8 +as their default encoding but in your code still have eight-bit I/O streams +(such as images or zip files), you need to explicitly open() or binmode() +with C<:bytes> (see L and L), or you +can just use C (nice for pre-5.8.0 backward compatibility). =item *