Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2344

text assets (including modules and stacks) should assume a utf-8 charset, and incude ;charset=utf-8 in the response content type

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.4
    • Component/s: tapestry-core
    • Labels:

      Description

      The Content-Type header sent for asset and module responses does not contain a charset specification. When they are loaded from within a page, browsers seem to assume that they have the same charset as the page, so as long as SymbolConstants.CHARSET is the same as the resource's charset, everything works fine. Changing the symbol value will cause the browser to use that to interpret the resonse and the result will probably be wrong.
      When requesting the module/asset in a separate browser tab, is is interpreted as ISO-5559-1 (HTTP 1.1 default charset). That can be seen when starting the tapestry-core/app1 test app and navigating to http://localhost:8080/tapestry-core/modules/moment.js. All the special characters in the i18n section are broken.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hlship Howard M. Lewis Ship
                Reporter:
                jkemnade Jochen Kemnade
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: