Change 14981 by jhi@alpha on 2002/03/04 03:46:31

        Subject: [ID 20020303.006] [Doc][utf8::up/down grade][use encoding] 
application for clarification
        From: Anton Tagunov <[EMAIL PROTECTED]>
        Date: Mon, 4 Mar 2002 05:41:41 +0300
        Message-Id: <[EMAIL PROTECTED]>
        
        Subject: [ID 20020303.005] Patch perlinicode C API description
        From: Anton Tagunov <[EMAIL PROTECTED]>
        Date: Mon, 4 Mar 2002 06:08:23 +0300
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

.... //depot/perl/lib/utf8.pm#22 edit
.... //depot/perl/pod/perlunicode.pod#77 edit

Differences ...

==== //depot/perl/lib/utf8.pm#22 (text) ====
Index: perl/lib/utf8.pm
--- perl/lib/utf8.pm.~1~        Sun Mar  3 21:00:05 2002
+++ perl/lib/utf8.pm    Sun Mar  3 21:00:05 2002
@@ -97,6 +97,13 @@
 
 =back
 
+C<utf8::encode> is like C<utf8::upgrade> but the UTF8 flag does not
+get turned on. See L<perlunicode> for more on the UTF8 flag and the C
+API functions C<sv_utf8_upgrade>, C<sv_utf8_downgrade>,
+C<sv_utf8_encode>, C<sv_utf8_decode> that are wrapped by the Perl
+functions C<utf8::upgrade>, C<utf8::downgrade>, C<utf8::encode> and
+C<utf8::decode>.
+
 =head1 SEE ALSO
 
 L<perlunicode>, L<bytes>

==== //depot/perl/pod/perlunicode.pod#77 (text) ====
Index: perl/pod/perlunicode.pod
--- perl/pod/perlunicode.pod.~1~        Sun Mar  3 21:00:05 2002
+++ perl/pod/perlunicode.pod    Sun Mar  3 21:00:05 2002
@@ -848,16 +848,16 @@
 
 =item *
 
-DO_UTF8(sv) returns true if the UTF8 flag is on and the bytes
-pragma is not in effect.  SvUTF8(sv) returns true is the UTF8
-flag is on, the bytes pragma is ignored.  Remember that UTF8
-flag being on does not mean that there would be any characters
-of code points greater than 255 or 127 in the scalar, or that
-there even are any characters in the scalar.  The UTF8 flag
-means that any characters added to the string will be encoded
-in UTF8 if the code points of the characters are greater than
-255.  Not "if greater than 127", since Perl's Unicode model
-is not to use UTF-8 until it's really necessary.
+DO_UTF8(sv) returns true if the UTF8 flag is on and the bytes pragma
+is not in effect.  SvUTF8(sv) returns true is the UTF8 flag is on, the
+bytes pragma is ignored.  The UTF8 flag being on does B<not> mean that
+there are any characters of code points greater than 255 (or 127) in the
+scalar, or that there even are any characters in the scalar.  What the
+UTF8 flag means is that the sequence of octets in the representation
+of the scalar should be treated as UTF-8 encoding of a string.
+The UTF8 flag being off means that each octet in this representation
+encodes a single character with codepoint 0..255 within the string.
+Perl's Unicode model is not to use UTF-8 until it's really necessary.
 
 =item *
 
End of Patch.

Reply via email to