How can I encode a Perl string so I can put it into an XML document?
Posted
by Sho Minamimoto
on Stack Overflow
See other posts from Stack Overflow
or by Sho Minamimoto
Published on 2010-05-24T04:58:30Z
Indexed on
2010/05/24
21:01 UTC
Read the original article
Hit count: 290
I'm not too fluent with the perl XML libraries (actually, I really suck at understanding encoding in general), all I'm doing is taking a string that possibly has characters such as "à" and putting it in an XML file, but when I open the file, I get an encoding error at the line containing such a character.
So I just need a lightweight way to take a string and encode it for XML.
© Stack Overflow or respective owner