summaryrefslogtreecommitdiff
path: root/lib/utf8.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-11 12:57:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-11 12:57:45 +0000
commit13a6c0e08df522ae430c77e8a15932642751b605 (patch)
treec07bf0421eee344673cbc66599bb3b19f14dc1af /lib/utf8.pm
parent365c80fab893fcefdfe12b07c44433776da0feed (diff)
downloadperl-13a6c0e08df522ae430c77e8a15932642751b605.tar.gz
Undocument the use of .*utf8.*{upgrade,downgrade,encode,decode}
as general purpose encoding transformation interfaces since that's not what they are. p4raw-id: //depot/perl@15169
Diffstat (limited to 'lib/utf8.pm')
-rw-r--r--lib/utf8.pm18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/utf8.pm b/lib/utf8.pm
index 7b1ef0ddc4..b18a043f10 100644
--- a/lib/utf8.pm
+++ b/lib/utf8.pm
@@ -79,21 +79,27 @@ The following functions are defined in the C<utf8::> package by the perl core.
Converts internal representation of string to the Perl's internal
I<UTF-X> form. Returns the number of octets necessary to represent
-the string as I<UTF-X>.
+the string as I<UTF-X>. Note that this should not be used to convert
+a legacy byte encoding to Unicode: use Encode for that. Affected
+by the encoding pragma.
=item * utf8::downgrade($string[, CHECK])
Converts internal representation of string to be un-encoded bytes.
+Note that this should not be used to convert Unicode back to a legacy
+byte encoding: use Encode for that. B<Not> affected by the encoding
+pragma.
=item * utf8::encode($string)
-Converts (in-place) I<$string> from logical characters to octet sequence
-representing it in Perl's I<UTF-X> encoding.
-
-=item * $flag = utf8::decode($string)
+Converts (in-place) I<$string> from logical characters to octet
+sequence representing it in Perl's I<UTF-X> encoding. Note that this
+should not be used to convert a legacy byte encoding to Unicode: use
+Encode for that. =item * $flag = utf8::decode($string)
Attempts to convert I<$string> in-place from Perl's I<UTF-X> encoding
-into logical characters.
+into logical characters. Note that this should not be used to convert
+Unicode back to a legacy byte encoding: use Encode for that.
=back