Hi,
I have a big UTF-8 xml file that contains english, french, german, and japanese text:
<?xml version="1.0" encoding="UTF-8"?>
I parse through it with a sax parser in a standard way:
SAXParser parser = new SAXParser();
parser.parse(xmlFile);
and it get inserted into an mySQL database via a prepared statement:
pstmt = con.prepareStatement("INSERT INTO...
at some point the japanese text loses it encoding and end up in the database as a bunch of question marks "???". Stangly though, the non-english, french and german characters are fine.
I am pretty sure it loses the encoding between XML and
Java (not Java and mySQL) becuase when I try printing to an HTML page before going to the DB, the smae problem occurs.
Any ideas? Do I maybe need to explicity set the encoding of the inputSource?
thanks for any help,
E.
[ January 23, 2005: Message edited by: Ezra Simon ]