Re: [PATCH] xsubpp prototypes warnings
[p5sagit/p5-mst-13.2.git] / lib / utf8.pm
index cb19686..7b1ef0d 100644 (file)
@@ -63,6 +63,12 @@ UTF-EBCDIC character.
 
 =back
 
+Note that if you have bytes with the eighth bit on in your script
+(for example embedded Latin-1 in your string literals), C<use utf8>
+will be unhappy since the bytes are most probably not well-formed
+UTF-8.  If you want to have such bytes and use utf8, you can disable
+utf8 until the end the block (or file, if at top level) by C<no utf8;>.
+
 =head2 Utility functions
 
 The following functions are defined in the C<utf8::> package by the perl core.
@@ -91,6 +97,13 @@ into logical characters.
 
 =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>