- From: fyuan <fyuan@mainet-system.com>
- Date: Fri, 27 Sep 2002 16:57:30 +0800
- To: "html-tidy@w3.org" <html-tidy@w3.org>
- Message-Id: <200209270858.EAA01598@tux.w3.org>
Hello: html-tidy glad to see u ,:) i use the jtidy and fing a question,maybe you can help me. this is my code: private Document toDom(InputStream istream) throws Exception{ tidy.setCharEncoding(Configuration.ISO2022); Document myDoc = tidy.parseDOM(istream,null); return myDoc; } private String toString(Document doc) throws Exception{ org.apache.xml.serialize.BaseMarkupSerializer serializer = new org.apache.xml.serialize.XHTMLSerializer(); StringWriter writer = new StringWriter(); serializer.setOutputCharStream(writer); try{ serializer.serialize(doc); writer.close(); }catch(IOException e){ e.printStackTrace(); return null; } return writer.toString(); } the input contains chinese word ,then use toDom and toString , the chinese word cannot be displayed well. for example : chinese word : "Öйú" displayed: "Öйú"; another example: the blackspace changed to "&iexcel". i dont know the reason,maybe you can help me . thanks a lot ,looking forward to your reply! Best wishes to you ! my email: fyuan@mainet-system.com.cn or scropatriot@sina.com.cn Best Wishes... Yours,Nicky Yuan 2002-09-27 Mainet System (Shangdong), Inc. OnlineForm Group Mobile Phone : 13916743343 Email : fyuan@mainet-system.com Email : scropatriot@163.com (Private) Homepage on WWW: Company Phone : 86-0532-8997265 Company Address : West Building, Laoshan Government Hall, LaoShan Hitech Park, Qingdao, Shandong ZIP Code : 266101
Attachments
- image/gif attachment: 13_832.gif
- image/jpeg attachment: mee.jpg
- image/gif attachment: _cid_002501c25d4f_1cc928e0_0b01a8c0_mainetsystem.gif
Received on Friday, 27 September 2002 05:10:13 UTC