[ 
https://issues.apache.org/jira/browse/CAMEL-7883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14153949#comment-14153949
 ] 

Benjamin BONNET commented on CAMEL-7883:
----------------------------------------

Hi,
when an imported XSD is decoded, Camel uses a converter defined in context. 
That converter involves a reader that will not take into account the XSD XML 
prolog. If that reader does not use the same encoding as one of the imported 
XSD, you may get into trouble while validating XML files.
Instead of providing the content of XSD as char stream, I think it is more 
appropriate to provide it as a binary stream and let Sax make a good guess 
about the XSD encoding.
I made a pull request on github with a unit test and a fix : see 
https://github.com/apache/camel/pull/291
Regards

> XSD decoding bad guess in Validator
> -----------------------------------
>
>                 Key: CAMEL-7883
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7883
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.13.2, 2.15.0
>            Reporter: Benjamin BONNET
>
> Validator component does not take imported XSD encoding into account when 
> validating XML. That may lead to validation errors if an imported XSD is 
> ISO-8859-1 encoded and containing non ASCII caracters, even though that XSD 
> declares its encoding correctly in its XML prolog.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to