Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
6.20.0
-
None
-
None
-
Windows server
Tomcat 7
Wicket 6.20.0
Description
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.
Attachments
Attachments
Issue Links
- duplicates
-
WICKET-5946 JavaScript/Css PackageResource should use the same charset for compressing
- Resolved