soi-toolkit / soi-toolkit-mule

SOI Toolkit and Mule ESB
Apache License 2.0
6 stars 1 forks source link

Robust-oneway pattern string encoding/decoding does not work #356

Closed hdahl closed 9 years ago

hdahl commented 9 years ago

Original issue 356 created by soi-toolkit on 2013-11-04T21:22:05.000Z:

Encoding in output file is wrong for input files with ISO-8859-1 encoding.

For example: output is "&# 65533;" (i.e. the code for parse/encoding error) for the inbound umlaut "Ö" character.

It seems like the encoding conversion in the process-stage:

<byte-array-to-string-transformer encoding="ISO-8859-1" doc:name="Byte Array to String"/>

<custom-transformer doc:name="Transform message" class="org.sample.filetoftp.flow1.process.Flow1Transformer"/>

<string-to-byte-array-transformer encoding="ISO-8859-1" doc:name="String to Byte Array"/>

doesn't work. Probably uses default UTF-8 instead of ISO-8859-1.

hdahl commented 9 years ago

Comment #1 originally posted by soi-toolkit on 2013-11-04T21:22:25.000Z:

<empty>

hdahl commented 9 years ago

Comment #2 originally posted by soi-toolkit on 2013-12-16T22:12:55.000Z:

Misconception, from transformer ref docs: "String encoding used for transformer output." I.e. the encoding must be set before the transformer in the flow to be used in the transformer.

hdahl commented 9 years ago

Comment #3 originally posted by soi-toolkit on 2014-01-24T16:53:22.000Z:

This issue was closed by revision r2112.

hdahl commented 9 years ago

Comment #4 originally posted by soi-toolkit on 2014-01-24T16:54:21.000Z:

Removed the <byte-array-to-string-transformer ... transformers and let the custom transformer have byte[] as in/out type - and handle encoding explicitly in the transformer. This is for example consistent with how an XSLT transformation would work.