No it does not read the file beforehand.

Use Tracer to see the Message Body.
And you have not stated which version of Camel you are using, despite
its highlighted on the how to get support page
http://camel.apache.org/support.html

Also you should check JIRA etc if there was a known issue with it
For example:
https://issues.apache.org/activemq/browse/CAMEL-2387


On Wed, Mar 24, 2010 at 5:37 PM, Kevin Jackson <[email protected]> wrote:
> Hi,
>
> Here is my route:
>
> <camel:camelContext xmlns="http://camel.apache.org/schema/spring";>
>        <endpoint id="fileConsumer"
>
> uri="file:///tmp?preMove=.inprogress&amp;move=.done&amp;moveFailed=.error&amp;delay=400&amp;noop=false"/>
>
>        <camel:route id="integration-start" startupOrder="1">
>            <camel:from uri="direct:start"/>
>            <camel:to uri="file:///tmp"/>
>        </camel:route>
>
>        <camel:route id="test-route" startupOrder="2">
>            <camel:from ref="fileConsumer"/>
>            <camel:convertBodyTo type="java.lang.String" charset="UTF-8"/>
>            <camel:split streaming="true">
>                <camel:tokenize token="\*\*\n" regex="true"/>
>                <camel:to uri="direct:out"/>
>            </camel:split>
>        </camel:route>
>
>        <camel:route id="integration-end" startupOrder="3">
>            <camel:from uri="direct:out"/>
>            <camel:to uri="mock:result"/>
>        </camel:route>
>    </camel:camelContext>
>
> The file is encoded as iso-8859-1, the locale on the system is utf-8
>
> I think the file consumer is reading the data incorrectly *before* I
> can convert it with <convertBodyTo>, the FileConsumer is reading the
> data as UTF-8 when it should be reading as ISO-8859-1
>
> Annoyingly iconv -f ISO-8859-1 -t UTF-8 <file> works perfectly and
> converts the characters correctly - I really don't want to have to
> shell out to iconv to perform conversion before consuming the file,
> but at the moment it seems to be the sanest way of dealing with this
> problem
>
> Thanks,
> Kev
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to