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.

<?xml version="1.0" encoding="BIG5"?>
<la1a>
	<name>&#xe372;■&#xf6b1;&#xf6b2;壹貳&#xf6bb;&#xf6bc;■</name>
	<sex>男</sex>
	<edu>大學</edu>
	<mankind>[EMAIL PROTECTED]</mankind>
	<ocu>宏&#x7881;&#xf6b1;&#xf6b2;股份有限公司</ocu>
	<birthday>70/08/06</birthday>
	<tel>02-27841000</tel>
	<cell>0932182117</cell>
	<id>F222222222</id>
	<address>台北市信義路4段6號9樓</address>
</la1a>

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);
	}
}

Reply via email to