Show
Ignore:
Timestamp:
02/09/09 18:50:51 (3 years ago)
Author:
drry
Message:
  • fixed regexes.
  • et cetera.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Encode/trunk/Unicode/Unicode.pm

    r1747 r29767  
    7070=head1 SYNOPSIS 
    7171 
    72     use Encode qw/encode decode/;  
     72    use Encode qw/encode decode/; 
    7373    $ucs2 = encode("UCS-2BE", $utf8); 
    7474    $utf8 = decode("UCS-2BE", $ucs2); 
     
    231231 
    232232Note 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,  
     233perl does not prohibit the use of characters within this range.  To perl, 
    234234every one of \x{0000_0000} up to \x{ffff_ffff} (*) is I<a character>. 
    235235 
     
    242242Unicode encodings simply croaks. 
    243243 
    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' 
    246246  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' 
    249249  UTF-16:Unrecognised BOM 424f at /path/to/Encode.pm line 184. 
    250250 
     
    265265 
    266266Ch. 15, pp. 403 of C<Programming Perl (3rd Edition)> 
    267 by Larry Wall, Tom Christiansen, Jon Orwant;  
     267by Larry Wall, Tom Christiansen, Jon Orwant; 
    268268O'Reilly & Associates; ISBN 0-596-00027-8 
    269269