develooper Front page | perl.unicode | Postings from March 2008

Decode, byte codes ASCII & ISO-8859 and HTMLCREF or XMLCREF

From:
Chris Hall
Date:
March 11, 2008 12:09
Subject:
Decode, byte codes ASCII & ISO-8859 and HTMLCREF or XMLCREF

Having tried:

   $o = Encode::decode('ascii',      "abc \x80 \xFF", FB_HTMLCREF)
   $o = Encode::decode('ISO-8859-7', "abc \xFF",      FB_HTMLCREF)

   $o = Encode::decode('ascii',      "abc \x80 \xFF", FB_XMLCREF)
   $o = Encode::decode('ISO-8859-7', "abc \xFF",      FB_XMLCREF)

(0xFF is not a valid character value in ISO-8859-7.)

I find that they produce neither &128; and &255; nor € and &#xFF, 
but exactly the same as:

   $o = Encode::decode('ascii',      "abc \x80 \xFF", FB_PERLQQ)
   $o = Encode::decode('ISO-8859-7', "abc \xFF",      FB_PERLQQ)

namely \x80 and \xFF !

Almost as if there were a bug.  Or have I missed the right piece of the 
documentation ?

-- 
Chris Hall               highwayman.com




Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About