Closed spring-operator closed 14 years ago
Alexander Heusingfeld commented
I just cloned this issue which originally was ##4932 as this is also a major bug in Spring Integration 1.0.3! The code snippets seem to be the same as in Iwein's fix actually.
Could you please create a bugfix release for this as it is currently having an impact on our production system.
Thanks guys. Alex
Alexander Heusingfeld commented
Dave,
I really intended to issue this as a bug!
My problem is that there are xml files coming from a jms queue which still contain a xml header including the encoding.
E.g. \<?xml version="1.0" encoding="ISO-8859-1"?>
When they are written to the disk via
Iwein already "fixed" this for 2.0.0.M3 by providing a namespace configuration option.
To actually solve my issue I already thought about writing a file-transformer which extracts and removes the xml-header from the payload and adds a message header instead. Do you know whether there is something like this already in SI2.0.0.M3?
Cheers Alex
Iwein Fuld commented
We need to backport the fix into 1.0.x branch. Good spot. Why is the "fixed" in quotes btw, is there something special/fishy about the fix that went into 2.0.0.M3?
Iwein Fuld commented
Changing type to bug, fix version to 1.0.4
Alexander Heusingfeld commented
Iwein, thanks for fixing this.
I used quotes for "fixed" as I think the approach is not the optimal way of solving this. IMHO we should provide a way to define the encoding per message. In case of XML files this could be done by parsing the header and extracting the encoding to a message header. I'd suggest this feature can be enabled via configuration - not (only) by file suffix.
Unfortunately I haven't got any clue yet, how to guess the encoding of files other than XML... :-/
Cheers Alex
Iwein Fuld commented
Just committed the backport of #4932.
Alexander, could you run a latest build of the 1.0.x branch and confirm the fix works for you (reopen if it doesn't)?
For the other features you mentioned:
Alexander Heusingfeld commented
The fix seems to work - just as it did in 2.0.0.M3!
As to your suggestion I created #5083 to express the need for handling the encoding of XML files. I left out the "general" approach for all files as I think this should not be discussed any further before there are no practical experiences with the solution for XML files - which do contain an encoding info.
Alexander Heusingfeld opened INT-1067 and commented
If you can't set the encoding (or use a platform independent encoding as default), you can't write platform independent software.
Affects: 1.0.3