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 2015/10/29 08:43:27 UTC

[jira] [Resolved] (WICKET-6012) Confused character encodings in JavaScriptPackageResource and CssPackageResource

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

Martin Grigorov resolved WICKET-6012.
-------------------------------------
    Resolution: Duplicate

We need to release 6.21.0 soon! 
4 months is definitely too long!

> Confused character encodings in JavaScriptPackageResource and CssPackageResource
> --------------------------------------------------------------------------------
>
>                 Key: WICKET-6012
>                 URL: https://issues.apache.org/jira/browse/WICKET-6012
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.20.0
>         Environment: Windows server
> Tomcat 7
> Wicket 6.20.0
>            Reporter: Jon Mann
>         Attachments: JavaScriptPackageResource.jpg, js-compressor-disabled.jpg, js-compressor-enabled.jpg, wicket-6012-test.zip
>
>
> We encountered a character encoding problem with a Javascript resource provided by Wicket 6.20.0 from our application hosted by Tomcat 7 on a Windows server (with a JVM default charset of "windows-1252").
> The source Javascript resource is UTF-8 encoded with a leading BOM mark. The leading bytes of the resource received by the browser are broken.
> We tested several different solutions which all worked (with various consequences):
> 1. Remove the BOM mark from the source Javascript file
> 2. Set the JVM "file.encoding" property to "UTF-8".
> 3. Disable DefaultJavaScriptCompressor in Wicket
> 4. Change the code in JavaScriptPackageResource to "return output.getBytes("UTF-8")"
> We solved this problem using solution #1.
> We think you should consider changing the code in  JavaScriptPackageResource and CssPackageResource per solution #4.
> Please see the attached images and an example quickstart test case (which demonstrates the problem on my Windows machine where the JVM default character encoding is "windows-1252").
> Thanks to the Wicket team for a great framework.



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