Java Mailing List Archive

http://www.junlu.com/

Home » JDOM Projects »

[jdom-interest] Encoding issue

Sébastien Piller

2008-10-24

Replies: Find Java Web Hosting

Author LoginPost Reply
I've a problem with JDom in one of my webapps.

It runs under linux centos, Tomcat5.5.27, JDom v1.1, etc.

My customer send me a file which is created like this:

- exported to XML UTF8
- converted to Base64
- POSTed to my webapp. (headers are set to the correct encoding)

I decode it like this:
- get the data
- convert it back from base64
- parse the data with new SAXBuilder().build(...)

After that, when I get strings using "mynode.getChildText("bla")", it is
misencoded, ie: "ü" comes "ä".

I was thinking that JDom will handle all possible conversion himself. I
really don't want to convert extracted strings using
Charset.forName().encode or else....

Any idea on what am I doing wrong?

Thank you very much ;)
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.