axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Chabanois <CChaban...@natsystem.fr>
Subject RE: bug #24896 : I don't understand what we are doing in Abstract XMLE ncoder
Date Wed, 26 Nov 2003 15:53:04 GMT
I tried EchoHeaders using the following string "Une chaîne avec des
caractères accentués et du japonais : \u4eca\u65e5\u306f\u4e16\u754c" (which
means "A string with accent characters and japanese : hello world"(hello
world in japanese)
The string in request and response (captured using TcpTrace) was "Une
chaîne avec des caractères accentués et du japonais : ä»Sæ-¥ã¯ä¸-ç*OE"
I pasted this as UTF-8 in a unicode editor (Unipad) and I got my french
string followed by the japanese characters as I expected.

Not a complete test but it seems to work.

Cédric


> -----Message d'origine-----
> De : Davanum Srinivas [mailto:dims@yahoo.com]
> Envoyé : mercredi 26 novembre 2003 16:52
> À : axis-dev@ws.apache.org
> Objet : Re: bug #24896 : I don't understand what we are doing in
> AbstractXMLE ncoder
> 
> 
> That's what am trying to figure out as well :) Right now, am 
> writing more test cases against the
> EchoHeaders.jws just to be sure we don't break anything.
> 
> -- dims
> 
> --- Cédric_Chabanois <CChabanois@natsystem.fr> wrote:
> > Hi all,
> > 
> > My correction for bug #24896 worked ie xml sent is in UTF-8 
> format (before
> > french accents, chinese characters ... were not transmitted 
> correctly) but I
> > don't really understand what we are doing In AbstractXMLEncoder and
> > UTF8Encoder :
> > encode method takes a java String.
> > This string is converted to a byte array in UTF-8 (using
> > String.getBytes("UTF-8")) and
> > & becomes "&amp"
> > " becomes "&quot"
> > < becomes "&lt"
> > > becomes "&gt"
> > all other characters are encoded using UTF-8 (appendEncoded 
> method in
> > UTF8Encoder).
> > 
> > Then the characters are converted back to a string (using 
> UTF-8 charset
> > since my patch and using platform's default charset before 
> my patch : the
> > bytes were not valid for the default charset)
> > 
> > I wonder why we use an UTF-8 byte array there just to 
> reconvert it to a
> > string after since all we do is to convert some characters 
> (& -> &amp ...).
> > 
> > There is probably something I missed somewhere ...
> > 
> > Cédric
> 
> 
> =====
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 

Mime
View raw message