Re: Handling £ (pound sterling) symbo ls in content

mirod <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
Neil Hughes wrote:
> I've hit a problem in XML::Twig trying to handle data exported from a 
> legacy database, but I suspect this is an issue I need to get some 
> advice on regardless of the parser...
> 
> The data contains '£' symbols which I'm struggling to format in XML for 
> processing later on. The following code might help explain:

I suspect your data is not in utf-8 (or utf-16). If the pound sign is encoded in
latin1 (or a windows encoding), then the XML is not well-formed.

You can check that by doing for example iconv -f utf8 -t utf8 myfile.xml If that
fails, then add an XML declaration with the proper encoding at the top of the
file or convert it to utf8 (using iconv again).

Does that help?

-- 
mirod
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.