[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] XML::Dumper and high ascii



At 1:46 PM -0500 11/15/00, Chris Nandor wrote:
>At 9:49 -0800 2000.11.15, Andrew O. Mellinger wrote:
>  >Y'all,
>  >
>  >   I am using XML::Dumper to store data to some files.  I then copied
>  >these xml files to my linux box and tried to read them in using
>  >XML::Parser and it pukes.
>  >
>  >   When I tried using the XML::Dumper code on the linux box, it
>  >outputs different characters.
>  >
>  >   XML::Dumper double-byte encode the characters when it outputs them,
>  >but it seems to use a different high-byte character depending on
>  >platform.
>  >
>  >On a mac Ÿ goes to:
>  >
>  >  ˆÑ
>  >
>  >when on linux PPC it is saved as:
>  >
>  >  Ä
>  >
>  >   Does anyone know how to make them use the same character?  Or to be
>  >able to make them use the same  encoding standard?
>
>If you are using regular high-bit Mac characters, you are using the
>MacRoman character set.  Your best bet might be to convert it to Latin-1
>before sending it to the XML; another possibility would be to set an
>encoding parameter in the XML file (but I don't know if that will help or
>not).

   The XML dumper code uses an "XmlUtf8Encode" routine that he says he 
borrowed from XML::DOM.  I don't know enough about UTF-8 to know if 
it working right or not, but I would expect UTF-8 files to be able to 
be copied about easily.

   Is there an easy way to convert to Latin-1?

   Also, is there an easy way to convert this stuff to HTML entities 
for printing?

Thanks!
-Andrew

/*-------------------------------------------------------------
Andrew O. Mellinger                      Direct: (503) 265-1220
Critical Path Software, Inc.               Main: (503) 222-2922
General Specialist                          Fax: (503) 222-3020
mailto:andrew@criticalpath.com      http://www.criticalpath.com
-------------------------------------------------------------*/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org