cloudtrends / soi-toolkit

Automatically exported from code.google.com/p/soi-toolkit
1 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Encoding in output file is wrong for input files with ISO-8859-1 encoding.

For example: output is "�" (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.

Original issue reported on code.google.com by hakan.d...@gmail.com on 4 Nov 2013 at 9:22

GoogleCodeExporter commented 9 years ago

Original comment by hakan.d...@gmail.com on 4 Nov 2013 at 9:22

GoogleCodeExporter commented 9 years ago
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.

Original comment by hakan.d...@gmail.com on 16 Dec 2013 at 10:12

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2112.

Original comment by hakan.d...@gmail.com on 24 Jan 2014 at 4:53

GoogleCodeExporter commented 9 years ago
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.

Original comment by hakan.d...@gmail.com on 24 Jan 2014 at 4:54