summaryrefslogtreecommitdiff
path: root/pod/perlunicode.pod
diff options
context:
space:
mode:
authorKarl <khw@karl.(none)>2008-12-26 10:18:34 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-12-26 23:23:55 +0100
commitfe749c9aa803ce74d997ff797103481a55741837 (patch)
treea8009cd572392a5b7a06cc5988ebc5661dd65f91 /pod/perlunicode.pod
parenteccdc4d715215b93b6b598d8cf3ac12e323f67e0 (diff)
downloadperl-fe749c9aa803ce74d997ff797103481a55741837.tar.gz
Update comments and documentation dealing with utf
Diffstat (limited to 'pod/perlunicode.pod')
-rw-r--r--pod/perlunicode.pod14
1 files changed, 12 insertions, 2 deletions
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod
index 068b2f3176..e6a1f3fab0 100644
--- a/pod/perlunicode.pod
+++ b/pod/perlunicode.pod
@@ -116,7 +116,7 @@ be used to force byte semantics on Unicode data.
If strings operating under byte semantics and strings with Unicode
character data are concatenated, the new string will have
-character semantics.
+character semantics. This can cause surprises: See <L/BUGS>, below
Under character semantics, many operations that formerly operated on
bytes now operate on characters. A character in Perl is
@@ -1451,7 +1451,8 @@ This can lead to unexpected results in which a string's semantics suddenly
change if a code point above 255 is appended to or removed from it,
which changes the string's semantics from byte to character or vice versa.
This behavior is scheduled to change in version 5.12, but in the meantime,
-a workaround is to always call utf8::upgrade($string).
+a workaround is to always call utf8::upgrade($string), or to use the
+standard modules L<Encode> or L<charnames>.
=head2 Interaction with Extensions
@@ -1533,6 +1534,15 @@ be quite a bit slower (5-20 times) than their simpler counterparts
like C<\d> (then again, there 268 Unicode characters matching C<Nd>
compared with the 10 ASCII characters matching C<d>).
+=head2 Possible problems on EBCDIC platforms
+
+In earlier versions, when byte and character data were concatenated,
+the new string was sometimes created by
+decoding the byte strings as I<ISO 8859-1 (Latin-1)>, even if the
+old Unicode string used EBCDIC.
+
+If you find any of these, please report them as bugs.
+
=head2 Porting code from perl-5.6.X
Perl 5.8 has a different Unicode model from 5.6. In 5.6 the programmer