Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ansi encoding XML files?

 
Justin Chu
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to use ANSI encoding XML files?
What should be the header be?
By default, if the xml file is in ANSI encoding and there's no <?xml?> header, java parsers will throw a UTF8 reading error..
 
Christophe Lee
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe by default xml files are UTF-8.
Try:
<?xml version="1.0" encoding="ISO-8859-1"?>
or this?
<?xml version="1.0" encoding="windows-1252"?>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic