From 77b687535236fe03ca34b69d8030537e4c1e1645 Mon Sep 17 00:00:00 2001 From: Pali Date: Fri, 29 Dec 2017 00:06:09 +0100 Subject: [PATCH] Remove misleading documentation about UTF8 flag Fixes: https://rt.cpan.org/Ticket/Display.html?id=34259 --- Encode.pm | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/Encode.pm b/Encode.pm index 035169c..c4e030a 100644 --- a/Encode.pm +++ b/Encode.pm @@ -949,38 +949,11 @@ different kinds of strings and string-operations in Perl: one a byte-oriented mode for when the internal UTF8 flag is off, and the other a character-oriented mode for when the internal UTF8 flag is on. -Here is how C handles the UTF8 flag. - -=over 2 - -=item * - -When you I, the resulting UTF8 flag is always B. - -=item * - -When you I, the resulting UTF8 flag is B--I you can -unambiguously represent data. Here is what we mean by "unambiguously". -After C<$str = decode("foo", $octet)>, - - When $octet is... The UTF8 flag in $str is - --------------------------------------------- - In ASCII only (or EBCDIC only) OFF - In ISO-8859-1 ON - In any other Encoding ON - --------------------------------------------- - -As you see, there is one exception: in ASCII. That way you can assume -Goal #1. And with C, Goal #2 is assumed but you still have to be -careful in the cases mentioned in the B paragraphs above. - This UTF8 flag is not visible in Perl scripts, exactly for the same reason you cannot (or rather, you I) see whether a scalar contains a string, an integer, or a floating-point number. But you can still peek and poke these if you will. See the next section. -=back - =head2 Messing with Perl's Internals The following API uses parts of Perl's internals in the current