Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5943

camel-hl7 marshal charset error

    XMLWordPrintableJSON

Details

    • Patch Available
    • Moderate

    Description

      Suppose you have an environment with default charset = ISO-8859-1 and a route like this one:

      ... 
      <bean id="hl7codec" class="org.apache.camel.component.hl7.HL7MLLPCodec">
          <property name="charset" value="utf-8" />
      </bean>
      ...
      <camel:from uri="mina2:tcp://localhost:8787?sync=true&amp;codec=#hl7codec"/>
      //do someting with hl7 object
      <camel:marshal><hl7/></camel:marshal>
      //do someting with hl7 string
      ...
      

      The marshal fail because it use default charset (ISO-8859-1 in this example) without taking in account the Exchange.CHARSET_NAME property (UTF-8 in this example)

      Attachments

        Activity

          People

            njiang Willem Jiang
            valdar Andrea Tarocchi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified