Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Servlet Interest »

UTF-8 and JDOM

Sajjad Awan

2004-08-26


Hi every one

I know this is not a relted question to this mail list but currently i
m not ubcribed to the xml mail list. so
My problem is this i real a file from a url that contins data like

<headline>å æ ø Daniel Jensen klar for Werder Bremen</headline>

contining some danish char, and XML encoding ="UTF-8"

when i build its document

   SAXBuilder builder = new SAXBuilder(false);
   newsDocument = builder.build(inStream);
   XMLOutputter outputter = new XMLOutputter(" ",true);
   outputter.output(newsDocument, System.out);

it prints
<headline>ÃÃ¥ æ ø Kys hinanden</headline>
and save it to DB and then have to serve to client
it s working fine when i read this data using writeUTF/readUTF but
creating problem when i use write/ readFully meathod of data input
stream


Thanx in advance
--
Muhammad Sajjad Awan
+92 300 4110129

___________________________________________________________________________
To unsubscribe, send email to listserv@(protected)
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
©2008 junlu.com - Jax Systems, LLC, U.S.A.