camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nojonojo <>
Subject Restlet component and alternate character sets
Date Thu, 12 Mar 2009 17:24:30 GMT

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:

>         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.


View this message in context:
Sent from the Camel - Users (activemq) mailing list archive at

View raw message