camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Restlet component and alternate character sets
Date Thu, 12 Mar 2009 17:28:26 GMT
On Thu, Mar 12, 2009 at 6:24 PM, nojonojo <n0_j0@yahoo.com> wrote:
>
> It appears to me that the Restlet component doesn't support character sets
> other than the default.  In general, Camel uses the Exchange.CHARSET_NAME
> property in the Exchange to determine which character set to use in
> conversions between binary and String representations.  The
> DefaultRestletBinding doesn't pass this information on to the Restlet
> library in the populateRestletResponseFromExchange method.
>
> A simple change makes this work.  Applying the following diff passes the
> charset information onto the Restlet component properly:
>
> 217a218,221
>>         if (exchange.getProperty(Exchange.CHARSET_NAME) != null)
>>         {
>>
>> response.getEntity().setCharacterSet(CharacterSet.valueOf(exchange.getProperty(Exchange.CHARSET_NAME,
>> String.class)));
>>         }
>
> This sets the characterset for the Restlet representation at the very end of
> the populateRestletResponseFromExchange method.
Good spot

I am sure Willem Tam can fix this as he doing most of this camel component.
And it should be backported to 1.6.1 as well.



>
> Thanks.
>
> Nolan
> --
> View this message in context: http://www.nabble.com/Restlet-component-and-alternate-character-sets-tp22481379p22481379.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Mime
View raw message