hello can you help me?

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: "Öй&uacute";
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

Received on Friday, 27 September 2002 05:10:13 UTC