XML.com 
 Published on XML.com http://www.xml.com/pub/a/2000/04/26/encodings/conclusion.html
See this if you're having trouble printing code examples

 

Encodings in XML::Parser: Conclusion
By Michel Rodriguez
April 26, 2000

Table of Contents
Introduction
XML::Parser and Character
  Encodings
Encodings in XML::Parser:
  Examples
Conclusion

Unicode is really cool. I mean really cool! I can't begin to tell you what a pain it is to deal with special characters -- even something as trivial as accented characters in a name -- in a non-Unicode environment. And using GIF images for Greek letters is really not satisfying.

So, the way to go is really to try to use Unicode as much as possible. If your environment is not Unicode-enabled, your first priority should be to try to upgrade your tools to get a fully Unicode system. Make it a criteria when you get new tools (pressure your vendors to add Unicode support). It will save you a tremendous amount of energy in the long run.

Of course, sometimes you just can't get all the tool support you need in a straightforward manner. However, now that you've read this article, Perl can help you. Here are your options:

This article should at least get you started on encodings. Now all I have to do is read it once more, and go back to XML::Twig to incorporate all the ideas I had while writing this!

Resources
• XML::Parser: the Perl XML parser

XML::Encoding: adds various encodings to
  XML::Parser
Unicode::String: converts from UTF-8
  to ISO-8859-1 (latin 1)
XML::UM (in libxml-enno): converts from UTF-8 to any
  encoding covered in XML::Encoding

XML::Code: converts from UTF-8 to
  ASCII + XML Character Entities

XML.com Copyright © 1998-2006 O'Reilly Media, Inc.