camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Burkard Stephan <Stephan.Burk...@visana.ch>
Subject Charset on file poller endpoint
Date Thu, 04 May 2017 10:01:03 GMT
Hi Camel users

I read files with a Camel file poller and they can have different encodings (UTF-8 with or
without BOM, UTF-16). Therefore I would like to determine the given encoding and convert the
message body to UTF-8 without BOM for the further processing.

How can I do this and what is exactly the result in the message payload in the exchange? Is
it payload an inputstream (just bytes, no encoding) or is it already converted to a string
or a reader (already encoded).

And what does the "charset" option change? Does it overwrite the default encoding of the operating
system? 

from(file:/myDir)
// can I read here the first bytes of the file?
.to(activemq:queue:myQueue)

Thanks for any hints
Stephan
Mime
View raw message