Changeset 29767 for lang/perl/Encode/trunk/Unicode/Unicode.pm
- Timestamp:
- 02/09/09 18:50:51 (3 years ago)
- Files:
-
- 1 modified
-
lang/perl/Encode/trunk/Unicode/Unicode.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Encode/trunk/Unicode/Unicode.pm
r1747 r29767 70 70 =head1 SYNOPSIS 71 71 72 use Encode qw/encode decode/; 72 use Encode qw/encode decode/; 73 73 $ucs2 = encode("UCS-2BE", $utf8); 74 74 $utf8 = decode("UCS-2BE", $ucs2); … … 231 231 232 232 Note this move has made \x{D800}-\x{DFFF} into a forbidden zone but 233 perl does not prohibit the use of characters within this range. To perl, 233 perl does not prohibit the use of characters within this range. To perl, 234 234 every one of \x{0000_0000} up to \x{ffff_ffff} (*) is I<a character>. 235 235 … … 242 242 Unicode encodings simply croaks. 243 243 244 % perl -MEncode -e '$_ = "\xfe\xff\xd8\xd9\xda\xdb\0\n"' \245 -e 'Encode::from_to($_, "utf16","shift_jis", 0); print'244 % perl -MEncode -e'$_ = "\xfe\xff\xd8\xd9\xda\xdb\0\n"' \ 245 -e'Encode::from_to($_, "utf16","shift_jis", 0); print' 246 246 UTF-16:Malformed LO surrogate d8d9 at /path/to/Encode.pm line 184. 247 % perl -MEncode -e '$a = "BOM missing"' \248 -e ' Encode::from_to($a, "utf16", "shift_jis", 0); print'247 % perl -MEncode -e'$a = "BOM missing"' \ 248 -e' Encode::from_to($a, "utf16", "shift_jis", 0); print' 249 249 UTF-16:Unrecognised BOM 424f at /path/to/Encode.pm line 184. 250 250 … … 265 265 266 266 Ch. 15, pp. 403 of C<Programming Perl (3rd Edition)> 267 by Larry Wall, Tom Christiansen, Jon Orwant; 267 by Larry Wall, Tom Christiansen, Jon Orwant; 268 268 O'Reilly & Associates; ISBN 0-596-00027-8 269 269
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)