On Tuesday 31 October 2006 22:01, HHDirecto.Net wrote: > In a .net webservice if I return a string with "º <", it sends in > xml "º <" and the .net says "º <" > > In a axis webservice if I return a string with "º <" caracter, it > send in xml "º <", and the .net client I recibe "? <". > This is the interesting statement. How do you determine what you receive, that is how do you ascertain that you received "? <" and not "º <". My guess is that you have an encoding issue on output, that is on displaying the received content. The ? is simply an indicator that the character could not be displayed.
> The question is why axis translate º to º and not send º as > utf-8? > It is my understanding that Axis behaves compliant with the XML spec. It is perfectly OK to sent any character as numeric entity. > > > 2006/10/31, Manuel Mall < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > On Tuesday 31 October 2006 20:55, HHDirecto.Net wrote: > > My .net client don't do it... > > I don't have experience with .Net but I find that hard to believe or > are you dealing within .Net with the raw message? What does .Net do > with < and &? > > Manuel > > > 2006/10/31, Manuel Mall < [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > > > > > Just curious why you don't like the characters encoded as numeric > > entities? Any decent XML parser should be able to handle that > > correctly and return the correct Unicode code point for these > > entities. > > > > Manuel > > > > On Tuesday 31 October 2006 20:32, Filozof71 wrote: > > > I implemented the temporarily solution, that encoeds the string > > > back into UTF-8 2-byes format. > > > > > > > > > protected String convertToUTF8( String s ) throws Exception { > > > > > > > > > HashMap hm = new HashMap(18); > > > > > > hm.put("ą", new byte[]{ (byte)196, (byte) 133 }); > > > > > > hm.put("ż", new byte[]{ (byte)197, (byte) 188 }); > > > > > > hm.put("ź", new byte[]{ (byte)197, (byte) 186 }); > > > > > > hm.put("ć", new byte[]{ (byte)196, (byte) 135 }); > > > > > > hm.put ("ń", new byte[]{ (byte)197, (byte) 132 }); > > > > > > hm.put("ł", new byte[]{ (byte)197, (byte) 130 }); > > > > > > hm.put("ó", new byte[]{ (byte)195, (byte) 179 }); > > > > > > hm.put("ę", new byte[]{ (byte)196, (byte) 153 }); > > > > > > hm.put("ś", new byte[]{ (byte)197, (byte) 155 }); > > > > > > hm.put ("Ą", new byte[]{ (byte)196, (byte) 132 }); > > > > > > hm.put("Ż", new byte[]{ (byte)197, (byte) 187 }); > > > > > > hm.put("Ź", new byte[]{ (byte)197, (byte) 185}); > > > > > > hm.put("Ć", new byte[]{ (byte)196, (byte) 134 }); > > > > > > hm.put("Ń", new byte[]{ (byte)197, (byte) 131 }); > > > > > > hm.put ("Ł", new byte[]{ (byte)197, (byte) 129}); > > > > > > hm.put("Ó", new byte[]{ (byte)195, (byte) 147}); > > > > > > hm.put("Ę", new byte[]{ (byte)196, (byte) 152}); > > > > > > hm.put("Ś", new byte[]{ (byte)197, (byte) 154}); > > > > > > > > > Iterator it = hm.keySet().iterator(); > > > > > > String key; > > > > > > > > > > > > while( it.hasNext ()) { > > > > > > key = (String)it.next(); > > > > > > //System.out.println("Replace : " + key); > > > > > > s = StringUtils.replace(s, key, new String( (byte []) > > > hm.get(key), "UTF-8" ) ); > > > > > > } > > > > > > > > > return s; > > > > > > > > > } > > > > > > > > > > > > To adopt it for your system you should replace the codes for you > > > language (spanic, portugese ?). Very helpfull is this site: > > > > > > <http://www.stanford.edu/~hc10/misc/binhexuni.html> > > http://www.stanford.edu/~hc10/misc/binhexuni.html > > > < http://www.stanford.edu/~hc10/misc/binhexuni.html > > <http://www.stanford.edu/~hc10/misc/binhexuni.html> > > > > > I also used the StringUtils class for Jakarta Commons Lang > > > package. > > > > > > sincerely Olek > > > > > > ----- Original Message ----- > > > From: "HHDirecto.Net" < [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > > > > > To: < <mailto: [email protected] > > <mailto:[email protected]> > <mailto:[email protected]> > [email protected]> > > > > Sent: Tuesday, October 31, 2006 12:03 PM > > > Subject: Re: Axis 1.4: Send dont't send string in UTF-8 > > > > > > > > > yes, maybe the same problem. Anyone knows about it? > > > > > > 2000/10/31, Filozof71 < [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > >: > > > > Hello, > > > > > > > > I have similar problem but I am not sure the same as yours. I > > > > put into response XML properly encoded 2-byte UTF-8 characters > > > > that get automatically > > > > encoded in HTML style &#x<code>; > > > > > > > > This is the same as yours ? > > > > > > > > sincerely Olek > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: HHDirecto.Net > > > > To: [email protected] <mailto:[email protected]> > > <mailto: <mailto:[email protected]> [email protected]> > > > > > Sent: Tuesday, October 31, 2006 10:29 AM > > > > Subject: Axis 1.4: Send dont't send string in UTF-8 > > > > > > > > > > > > My axis 1.4 WS don't return strings as utf-8. > > > > > > > > This is the response when I do: > > > > > > > > return "c iñigín nº 3"; > > > > > > > > > > > > <?xml version=" 1.0" encoding="utf-8"?><soapenv:Envelope > > > > xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/ > > <http://schemas.xmlsoap.org/soap/envelope/> > > > < <http://schemas.xmlsoap.org/soap/envelope/> > > http://schemas.xmlsoap.org/soap/envelope/> " > > > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema > > <http://www.w3.org/2001/XMLSchema> > > > < <http://www.w3.org/2001/XMLSchema> > > http://www.w3.org/2001/XMLSchema> " xmlns:xsi=" > > > > > http://www.w3.org/2001/XMLSchema-instance > > <http://www.w3.org/2001/XMLSchema-instance> > > > < <http://www.w3.org/2001/XMLSchema-instance> > > http://www.w3.org/2001/XMLSchema-instance> > > > > > "><soapenv:Body><damestringResponse > > > > xmlns=" http://interfazweb.serviciosweb.xxx.com > > <http://interfazweb.serviciosweb.xxx.com> > > > < http://interfazweb.serviciosweb.xxx.com > > <http://interfazweb.serviciosweb.xxx.com> > > > > > > "><damestringReturn>c iñigín nº > > > > > > 3</damestringReturn></damestringResponse></soapenv:Body></soapenv > > >:E nv elope> > > > > > > > Thanks in advance!! > > > > > > > > > > > > > > > > --------------------------------------------------------------- > > > >-- -- --- PS. >>> < http://link.interia.pl/f19a6 > > <http://link.interia.pl/f19a6> > > > > http://link.interia.pl/f19a6 <http://link.interia.pl/f19a6> > > > > > > --------------------------------------------------------------- > > > >-- -- -- To unsubscribe, e-mail: > > > > <mailto: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> For > > > > > additional commands, e-mail: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > > ----------------------------------------------------------------- > > >-- -- - Jestes kierowca? To poczytaj! >>> > > > http://link.interia.pl/f199e > > <http://link.interia.pl/f199e> > > > < http://link.interia.pl/f199e <http://link.interia.pl/f199e> > > > > > > ----------------------------------------------------------------- > > >-- -- To unsubscribe, e-mail: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > ------------------------------------------------------------------- > >-- To unsubscribe, e-mail: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
