Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 8163 invoked from network); 12 Mar 2009 17:24:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2009 17:24:59 -0000 Received: (qmail 75976 invoked by uid 500); 12 Mar 2009 17:24:59 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 75815 invoked by uid 500); 12 Mar 2009 17:24:58 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 75804 invoked by uid 99); 12 Mar 2009 17:24:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Mar 2009 10:24:58 -0700 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Mar 2009 17:24:51 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Lhody-00045a-DA for users@camel.apache.org; Thu, 12 Mar 2009 10:24:30 -0700 Message-ID: <22481379.post@talk.nabble.com> Date: Thu, 12 Mar 2009 10:24:30 -0700 (PDT) From: nojonojo To: users@camel.apache.org Subject: Restlet component and alternate character sets MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: n0_j0@yahoo.com X-Virus-Checked: Checked by ClamAV on apache.org 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. 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.