You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2013/04/26 17:30:16 UTC

[jira] [Resolved] (WICKET-4974) wicket enclosure ruins utf-8 characters inside raw markup

     [ https://issues.apache.org/jira/browse/WICKET-4974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4974.
-------------------------------------

    Resolution: Cannot Reproduce

Sorry, I cannot reproduce the problem.
Please attach an application that demonstrates the problem and we will debug it further.
Thanks!
                
> wicket enclosure ruins utf-8 characters inside raw markup
> ---------------------------------------------------------
>
>                 Key: WICKET-4974
>                 URL: https://issues.apache.org/jira/browse/WICKET-4974
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.9
>         Environment: windows 7 ultimate, java 7u10, jboss as 7.0.1
>            Reporter: Gabor Farkas
>
> When using utf-8 characters inside a wicket:enclosure element, utf-8 characters are displayed incorrectly.
> InlineEnclosure uses the Markup.of(String) method, that creates a StringResourceStream on the given string. StringResourceStream doesn't set a default character set. When getInputFromPositionMarker is called on the xmlParser (AbstractMarkupParser.parse), the input stream is already wrong.
> In the AbstractStringResourceString.getInputStream method, the charset is not set, so it defaults to calling getBytes() without a parameter, and that uses the vm default character set (that is usually not utf-8). However, xmlreader already uses utf-8, so the byte-level data gets converted wrong.
> A proper an not painful workaround is to use -Dfile.encoding=UTF8 as a JVM parameter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira