Thomas -

Sorry - I was thinking of the Mina2 codec - my apologizes for any confusion I 
may have caused.

The Netty encoder/decoder factories should have a charset property (from the 
HL7MLLPConfigAwareChannelHandlerFactory), but I looked at the source and it 
appears the Netty decoder may not be using that value - I’m looking in 
HL7MLLPNettyDecoder.java.  It looks like the constructor is using 
Charset.defaultCharset() rather than config.getCharset.

Can you test the decoder separately from the encoder to verify what I think I’m 
seeing?


> On Feb 15, 2016, at 4:35 AM, Walzer, Thomas <[email protected]> 
> wrote:
> 
> Quinn, thanks for looking into this:
> 
> However, the encoding parameter only works with the textline codec. The docs 
> say (and I say it too, because I tested it):
> 
>>>> The encoding (a charset name) to use for the textline codec. If not 
>>>> provided, Camel will use the JVM default Charset.<<<
> 
> I worked around this by not sending a string to netty4 but a byte-array.
> 
> Cheers, Thomas.
> 
>> Am 12.02.2016 um 17:13 schrieb Quinn Stevenson <[email protected]>:
>> 
>> The Netty4 encoder/decoder don’t have a “Charset” property - this is 
>> controlled by the “encoding” URI parameter.
>> 
>> 
>> 
>>> On Feb 12, 2016, at 5:36 AM, Walzer, Thomas <[email protected]> 
>>> wrote:
>>> 
>>> Hi there,
>>> 
>>> I tried (on camel 2.15.2):
>>> 
>>> 
>>> <bean id="hl7nettyencoder" 
>>> class="org.apache.camel.component.hl7.HL7MLLPNettyEncoderFactory“>
>>> <property name="charset" value="utf-8"/>
>>> </bean>
>>> 
>>> and 
>>> 
>>> <bean id="hl7nettyencoder" 
>>> class="org.apache.camel.component.hl7.HL7MLLPNettyEncoderFactory" 
>>> factory-method="setCharset">
>>> <argument value="utf-8"/>
>>> </bean>
>>> 
>>> Both do not work.
>>> 
>>> Any ideas/suggestions?
>>> 
>>> Cheers, Thomas.
>> 
> 

Reply via email to