Camel converter can take the encoding into consideration when it converts an input stream into String. I think you can leverage that. Now what we need to do is adding a feature[1] in camel-http component to setup the encoding header of the message if it can tell it from the Http header.
[1]https://issues.apache.org/jira/browse/CAMEL-7217 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 17, 2014 at 7:20:13 PM, gutsal.arsen ([email protected]) wrote: > > I'm using http4 component. Different pages comes with different > encoding. I'd > like to analyze either Content-Type header or meta/@http-equiv=Content-Type > encoding attribute and convert everything into default UTF-8. > How could I do > that? Probably patch for http4 component is needed (we could > create it). It > will be abit ugly to analyze http content in the patch, but I don't > see any > other way to do so. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/http4-component-to-convert-ANY-page-encoding-into-UTF-8-tp5747424.html > > Sent from the Camel - Users mailing list archive at Nabble.com. >
