You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Dennis Riedel <de...@web.de> on 2006/01/05 16:22:45 UTC

Re: Unicode support

Hello!
I also got to this point about taking care of my encoding. I use 
xml-rpc2.0, but my server uses ISO-8859-1 and not UTF-8. It is the 
"XmlRpcServer" Implementation. I register handler at this server with 
"addHandler()" and then, when an xml-rpc-request is recieved, give it 
the InputStream by using "execute()".
I looked for this get/set methods for the Encoding, but could only find 
them in some kind of "Worker" class that I never instantiate personally.

Is it possible to set the encoding when using the small "XmlRpcServer" ?

Dennis

John Wilson schrieb:

>
> On 31 Dec 2005, at 14:15, Jimisola Laursen wrote:
>
>> Hmm, I am not much into character encodings so bear with me.
>>
>> Is it not possible to change the default encoding for XML-RPC?
>> About "the receiver implementing the XML spec..." - where do I start?
>
>
> The XML-RPC client and server classes have get/set Encoding methods.
>
> I have just checked and as of version 2.0 the default encoding is UTF8.
>
> Are you implementing your own XML-RPC client? If so you need to use a  
> proper XML parser which will take care of the character references  
> for you.
>
> If you are using the Apache XML-RPC implementation for client and  
> server then you really don;t need to worry about the encoding - your  
> Unicode strings will arrive unchanged. This should also be true if  
> you are using any other XML-RPC implementation, however there are a  
> lot of implementations out there and some may not be very good at  
> handling the full Unicode character set.
>
>
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk
>
>
>


Re: Unicode support

Posted by John Wilson <tu...@wilson.co.uk>.
On 5 Jan 2006, at 15:22, Dennis Riedel wrote:

> Hello!
> I also got to this point about taking care of my encoding. I use  
> xml-rpc2.0, but my server uses ISO-8859-1 and not UTF-8. It is the  
> "XmlRpcServer" Implementation. I register handler at this server  
> with "addHandler()" and then, when an xml-rpc-request is recieved,  
> give it the InputStream by using "execute()".
> I looked for this get/set methods for the Encoding, but could only  
> find them in some kind of "Worker" class that I never instantiate  
> personally.
>
> Is it possible to set the encoding when using the small  
> "XmlRpcServer" ?
>
> Dennis


Are you actually experiencing an operational problem with this?

I have not run xml-rpc 2.0 but reading the code it appears that it  
uses numeric character escapes for all Unicode characters with code  
points > 127. This means that the encoding is effectively irrelevant.  
All Unicode characters should be transmitted safely no matter what  
encoding is used.



John Wilson
The Wilson Partnership
http://www.wilson.co.uk