Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, Ashish Kulkarni wrote: > Here is the code where i read the dom tree and then convert it to a String, > then convert this string into Byte array and then user > DocumentBuilder().parse to parse it. Silly question... why are you going that? Is

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Joe Germuska
See, the problem is that you're not handling the character encoding correctly in general. You should use String's getBytes method only when you know what you're doing, because the whole point of character encodings is that you can represent any given string with different sequences of bytes. I'd

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Ashish Kulkarni
Hi Here is the code where i read the dom tree and then convert it to a String, then convert this string into Byte array and then user DocumentBuilder().parse to parse it. I get error in factory.newDocumentBuilder().parse(byteArray); TransformerFactory tFactory = TransformerFactory.ne

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Joe Germuska
On 4/16/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, Ashish Kulkarni wrote: > I have java class which creates an XML file from SQL resultset, > It works fine in USA, but i am having issues when this process runs in > Germany where the

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, Ashish Kulkarni wrote: > I have java class which creates an XML file from SQL resultset, > It works fine in USA, but i am having issues when this process runs in > Germany where they have non UTF characters in there database like ü or á. I th

[OT] How to handle non UTF characters in XML

2007-04-16 Thread Ashish Kulkarni
Hi I have java class which creates an XML file from SQL resultset, It works fine in USA, but i am having issues when this process runs in Germany where they have non UTF characters in there database like ü or á. How do we handle this kind of situation in XML file, i set the XML file to be of UTF-8