Andy, I did not write any code. I was just using the sample program you can download with Xerces.
I kind of found the problem like this, with Xerces 2.6.2: In dom.GetElementsByTagName and dom.Writer, the same parse() method was used. But, in GetElementsByTagName, the output stream in just new PrinteWriter(System.out), while in Writer, the output stream is new OutputStreamWriter(System.out, "UTF-8") . Although the xml they are parsing are in UTF-8, the output stream cannot be set to UTF-8, because windows console is not UTF-8, I think. As the result, the one does not set UTF-8 shows correct characters, in windows-31j actually, and the one in UTF-8 shows wrong characters. Thanks, Jay -------------------------------------------------------------------- (Jay) Jun Yan Niku Corp., 305 Main Street, Redwood City, CA 94063 Work: 650-298-5918 -----Original Message----- From: Andy Clark [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 6:14 PM To: [EMAIL PROTECTED] Subject: Re: Parsing error on windows with Japanese Jun Yan wrote: > I have such an xml file as below. It's also attached. > > [...] This is very strange. How do you parse the document and how do you write it back to a file? A small bit of sample code would be useful. -- Andy Clark * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] CONFIDENTIALITY NOTICE: The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination, copying, or other use of this information by persons or entities other than the intended recipient is prohibited. If you received this e-mail or its attachments in error, please contact the sender and delete the material from any system and destroy any copies.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
