I've got an XML document that contains euro signs and looks like :
<?xml version="1.0" encoding="utf-8"?>
<merchant id="52">
<product
offerid="035430 68131"
deliverycost="6 ,90 €"
/>
....
I use this bit of Java (jdk 1.4.2) code to parse it :
DocumentBuilder Factory factory = DocumentBuilder Factory.newInst ance();
DocumentBuilder builder = factory.newDocu mentBuilder();
Document document = builder.parse( file_ );
The problem is the euro signs are transformed into the charactere '?'
(printing the value of a getAttribute( "deliveryco st" ) gives ? on a
utf-8 terminal)
Thanks for any help,
FL
<?xml version="1.0" encoding="utf-8"?>
<merchant id="52">
<product
offerid="035430 68131"
deliverycost="6 ,90 €"
/>
....
I use this bit of Java (jdk 1.4.2) code to parse it :
DocumentBuilder Factory factory = DocumentBuilder Factory.newInst ance();
DocumentBuilder builder = factory.newDocu mentBuilder();
Document document = builder.parse( file_ );
The problem is the euro signs are transformed into the charactere '?'
(printing the value of a getAttribute( "deliveryco st" ) gives ? on a
utf-8 terminal)
Thanks for any help,
FL
Comment