John:
I am still trying to debug this problem, but I want to share with you what I have found on the newsgroup about the usage of getOutputStream and getPrintWriter. The guy reported that on IBM webSphere, getOutputStream would return different output object depends on how the servlet is called. If it's called directly from the browser, it would return sun.servlet.http.HttpOutputStream, and if called from a JSP inside websphere, it would return com.ibm.servlet.PageCompilePCServletOutputStream. On the later case, the char would not be encoded correctly. He also reported that the output object returned from getPrintWriter always encode the char correctly. So, with this information, I was wondering if getPrintWriter should be used to obtain the i/o object to make the code more robustic? Thanks. - Yaxiong > -----Original Message----- > From: John Wilson [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, March 07, 2002 4:42 PM > To: [EMAIL PROTECTED] > Subject: Re: Illegal control character error > > > ----- Original Message ----- > From: "Lin, Yaxiong" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, March 07, 2002 10:12 PM > Subject: RE: Illegal control character error > > > > > > > > John: > > > > I am getting this error on the client side (running on webSphere/zOS). > I > > have the identical client java code running on NT and Solaris (both > Tomcat) > > talking to the same xmlrpc webserver app and they are all happy. > > > > So, I am pretty sure this control char is not in the data I am sending > > through xmlrpc. Any suggestion on how to debug this problem? > > The only thing I can suggest is character encoding. You should be using > ASCII or ISO 8859-1. If you are using UTF-8 or UTF-126 this could be > causing > the problem. > > John Wilson > The Wilson Partnership > http://www.wilson.co.uk
