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

Re: [MacPerl-Modules] XML::Parser: support for native Mac (Roman)character set?



At 11.04 -0700 2000.04.28, Mat Marcus wrote:
>I am trying to parse XML files output by CodeWarrior on the Mac.
>Typically these files contain some native mac roman characters -- µ
>(mu) for example. I was searching the archives of this list and
>noticed that Bart Lateur posted some relevant scripts some time back.
>Unfortunately these don't appear to be accessible via the archive.
>What was the final outcome? Is there a file I can drop into my
>site_perl somewhere to make XML::Parser happy? Could someone forward
>me the scripts so that I can try it myself?

I am not sure what the problem is, why XML::Parser is unhappy.  Is it
because it is barfing on the non-ASCII characters?  In XML::Parser's docs,
it says you can do something like this:

  $xml->parsefile($file, ProtocolEncoding => 'ISO-8859-1');

However, you probably want MacRoman, and I don't think it comes with
MacRoman.  You can try to build your own; see the ENCODINGS section of the
XML::Parser docs.

-- 
Chris Nandor       |     pudge@pobox.com      |     http://pudge.net/
Andover.Net        | chris.nandor@andover.net | http://slashcode.com/

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