Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
14.4.6
-
None
-
Unknown
-
Description
Steps to reproduce
- Create page Sandbox.VFS.WebHome.
- Attach zip containing an HTML with file encoded in UTF-8 and containing characters with accents (see sample test.zip).
- Generate URL to that HTML file using the VFS API, for example:
$services.vfs.url("attach:Sandbox.VFS.WebHome@test.zip/index.html")
- Then visit the page at the generated URL.
Actual result
The file is served with a content-type whose charset is not always UTF8. For instance on my machine, the response content-type header shown by the browser network inspector is: "text/html;charset=iso-8859-1". As a result, the file characters are not displayed correctly.
Environment
- XS 14.4 bundled in Jetty with default flavor
- Java 11
- Environment locales:
ubazj@ubazj:~$ locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC=fr_FR.UTF-8 LC_TIME=fr_FR.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8 LC_ALL=