[ https://issues.apache.org/activemq/browse/SM-784?page=comments#action_37736 ] Anders Hammar commented on SM-784: ----------------------------------
These are the problems found (so far): org.apache.servicemix.jbi.jasp.SourceTransformer (servicemix-core): 1. UTF-8 is hard coded as the default (and only) encoding, which is used in the toDOMSourceFromStream(StreamSource) method. Not sure the reason for this, because it works for me (in the ISO-8859-1 case) when just removing the setting of this encoding on the InputStream. 2. In the toResult(Source, Result) method, the output encoding needs to be set on the transformer. Possibly this is an Xalan bug, as the encoding is correct in the Source. However, setting the encoding as an output property on the transformer before the transformation fixes this. org.apache.servicemix.soap.marshalers.SoapWriter (sevicemix-soap): 1. In method writeSimpleMessage(OutputStream), when creating the XmlStreamWriter the encoding needs to be passed along. Otherwise the output will be in the wrong encoding. (I will attached a test for this.) org.apache.servicemix.components.xslt.XsltComponent: 1. In the transformContent method, the encoding needs to be specified when constructing the StringSource. If not specified, StringSource defaults to UTF-8. There could be other errors in the xms-components. I've only looked into the XsltComponent. However, the problem in XsltComponent raises the question why there even is a hard coded default encoding for StringSource. Is it really needed? I did some quick tests removing the usage of the encoding when calling String.getBytes() and it works for me (with ISO-8859-1 encoded xml message). However, according to the javadoc for String, this method uses the platform's default charset which could possibly be ISO-8859-1 in my case (don't know how to verify this). > No support for xml message encodings such as ISO-8859-1 > ------------------------------------------------------- > > Key: SM-784 > URL: https://issues.apache.org/activemq/browse/SM-784 > Project: ServiceMix > Issue Type: Bug > Components: servicemix-core, servicemix-components, servicemix-soap > Affects Versions: 3.0.1 > Environment: Windows XP SP2 (Swedish), JDK 1.5.0_9 > Reporter: Anders Hammar > Attachments: HttpISO88591Test.java, JmsISO88591Test.java > > > Servicemix only supports UTF-8 encoding, due to hard coded values. Support > for other encodings such as ISO-8859-1 is essential for countries such as the > Scandinavian ones. Xml has good support for this, and defined encoding in xml > messages should be honored. > The experienced problem occurs when passing an xml message (not soap, no > attachments) with encoding ISO-8859-1 defined, through servicemix. Problems > have been located in at least smx-core, smx-components, and smx-soap. > Attached are two test cases (one for http and one for jms) that shows this. > Use them with the http component and the jms component respectively (they use > test configuration existing within smx 3.0.1). > Another problem (duplicated characters) is related to a bug in woodstox. See > separate jira for that. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira