Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-9311

Charset option in camel File component is not working correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.2
    • jboss-fuse-6.3
    • Camel
    • % %
    • Hide

      Add a convertBodyTo entry after File consumer like follows:

      .convertBodyTo(byte[].class, "iso-8859-1")

      Show
      Add a convertBodyTo entry after File consumer like follows: .convertBodyTo(byte[].class, "iso-8859-1")
    • Hide

      1- Deploy the attached project on a fuse-eap-installer-6.3.0.redhat-347 on top of JBoss EAP 6.4.20.
      2- Drop the example.xml.ready_for_processing in /data/test folder
      3- Check the output

      Show
      1- Deploy the attached project on a fuse-eap-installer-6.3.0.redhat-347 on top of JBoss EAP 6.4.20. 2- Drop the example.xml.ready_for_processing in /data/test folder 3- Check the output

      The charset option in the camel file component is not working as expected, the char entry "åäö" is not recognized.

      To avoid this problem, user must do a convert body again to the desired charset, example:

      from("file:/data/test"
                      + "?charset=iso-8859-1")
      .convertBodyTo(byte[].class, "iso-8859-1")
      

            rhn-support-tasato Tadayoshi Sato
            emunoz@redhat.com Elkin Dario Munoz Duarte
            Tomas Veskrna Tomas Veskrna
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: