David,
 
could you try this code and tell me if it's working:
 
SAXReader reader = new SAXReader();
reader.setEncoding("Big5");
org.dom4j.Node xmlDocument = reader.read(new BufferedInputStream(new
FileInputStream(args[0])));
...
 
regards,
Maarten

David Thielen <[EMAIL PROTECTED]> wrote:

Hello;

 

As I understand it, 2 byte sequences in Big5 are the unicode value of the character. If this is not the case, then it may be converting them correctly and I just am not understanding Big5 correctly.

 

Thanks - dave

 


From: Maarten Coene [mailto:[EMAIL PROTECTED]
Sent: Monday, May 09, 2005 12:34 PM
To: David Thielen
Subject: Re: [dom4j-user] xml in BIG5 encoding - incorrect result

 

David,

 

could you send us some code showing how you are reading the XML file?

 

regards,

Maarten

David Thielen <[EMAIL PROTECTED]> wrote:

Hi;

 

When I have an xml file in BIG5 encoding, I dont get back the correct character values for 2 byte literals. Any idea as to why?

 

Thanks  dave

 


Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.



■壹貳■

大學
[EMAIL PROTECTED]
宏碁股份有­­公司
70/08/06
02-27841000
0932182117
F222222222
台北市信義路4段6號9樓



package net.windward.datasource.dom4j.test;

import org.dom4j.io.SAXReader;

import java.io.BufferedInputStream;
import java.io.FileInputStream;

/**
* @author David Thielen
* @version 4.0 May 9, 2005
*/
public class Big5Test {

public static void main(String[] args) throws Exception {

System.out.println("Parsing xml file " + args[0]);

SAXReader reader = new SAXReader();
org.dom4j.Node xmlDocument = reader.read(new BufferedInputStream(new FileInputStream(args[0])));

String val = xmlDocument.valueOf("/la1a/name");
System.out.println("val = " + val);
}
}


Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.

Reply via email to