From 13a6c0e08df522ae430c77e8a15932642751b605 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 11 Mar 2002 12:57:45 +0000 Subject: 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 --- lib/utf8.pm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'lib/utf8.pm') 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 package by the perl core. Converts internal representation of string to the Perl's internal I form. Returns the number of octets necessary to represent -the string as I. +the string as I. 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 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 encoding. - -=item * $flag = utf8::decode($string) +Converts (in-place) I<$string> from logical characters to octet +sequence representing it in Perl's I 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 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 -- cgit v1.2.1