Thanks a lot!! I tried that but I was setting a header in the message instead of a property of the exchange.
Camel rocks!! willem.jiang wrote: > > Hi > > You can set the encoding on each exchange by set the exchange property > with the name Exchange.CHARSET_NAME("CamelCharsetName") and value that > you want. > > You can do it with DSL > > setProperty(Exchange.CHARSET_NAME, > ExpressionBuilder.constantExpression("UTF-8")) > > or Spring config > <setProperty propertyName="CamelCharsetName"> > <constant>UTF-8</constant> > </setProperty> > > Willem > > > > mcrive wrote: >> Hi, >> my route gets a feed (string) from a web service and distribute it to >> several endpoint. >> when I get the feed I might get it in UTF-8 or ISO-8859-I and I would >> like >> to respect this encoding when distributing the feed to the endpoint(s). >> >> The feed is stored as body of the exchange. >> >> At the moment the route delivers to the endpoint the default charset >> where >> it runs. >> >> I need to do the same thing that convertBodyTo does but with the >> flexibility >> of setting the encoding on each exchange, is it possible to set the >> charset >> on the run? >> Even encoding in the correct charset when setting the body would be fine. >> >> > > > -- View this message in context: http://old.nabble.com/need-create-a-route-which-can-handle-several-encoding-tp28480336p28483227.html Sent from the Camel - Users mailing list archive at Nabble.com.