On Thu, Mar 12, 2009 at 6:24 PM, nojonojo <n0...@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/

Reply via email to