This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes SAX Parser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "SAX Parser" Watch "SAX Parser" New topic
Author

SAX Parser

Rudy Simon Yeung
Greenhorn

Joined: Jun 06, 2003
Posts: 15
I have a program using SAXParserFactory and SAXParser classes to parse an xml file. The XML file is now further enhanced that could contain double bytes (e.g. Chinese characters). How should I make use of the SAX classes to parse the xml file saved in UTF-8 format?
Rudy Simon Yeung
Greenhorn

Joined: Jun 06, 2003
Posts: 15
I get the answer myself. Simply just change the encoding part of the xml header into "UTF-8".
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Originally posted by Rudy Simon Yeung:
I get the answer myself. Simply just change the encoding part of the xml header into "UTF-8".


Glad we could help Rudy.


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
GeeCON Prague 2014
 
subject: SAX Parser