You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Jimisola Laursen <li...@jimisola.com> on 2005/12/30 17:59:05 UTC
Unicode support
Hi!
Does XML-RPC have full support for Unicode and what encoding? UTF-16 like
Java or?
Regards,
Jimisola
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
Re: Unicode support
Posted by Dennis Riedel <de...@web.de>.
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 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 Jimisola Laursen <li...@jimisola.com>.
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?
Regards,
Jimisola
----- Original Message -----
From: "John Wilson" <tu...@wilson.co.uk>
To: <xm...@ws.apache.org>
Sent: Saturday, December 31, 2005 12:19 PM
Subject: Re: Unicode support
>
> On 30 Dec 2005, at 16:59, Jimisola Laursen wrote:
>
>> Hi!
>>
>> Does XML-RPC have full support for Unicode and what encoding?
>> UTF-16 like Java or?
>
> As default the encoding used is ISO 8859-1. All Unicode characters
> can be represented in this encoding via character references.
>
> So any Unicode character you send will be received safely (as long as
> the receiver implements the XML spec for character encoding and
> decoding properly)
>
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk
>
>
>
Re: Unicode support
Posted by John Wilson <tu...@wilson.co.uk>.
On 30 Dec 2005, at 16:59, Jimisola Laursen wrote:
> Hi!
>
> Does XML-RPC have full support for Unicode and what encoding?
> UTF-16 like Java or?
As default the encoding used is ISO 8859-1. All Unicode characters
can be represented in this encoding via character references.
So any Unicode character you send will be received safely (as long as
the receiver implements the XML spec for character encoding and
decoding properly)
John Wilson
The Wilson Partnership
http://www.wilson.co.uk