Skip to content

i18n.properties responds with wrong charset #340

@htammen

Description

@htammen

Expected Behavior

When using german umlaute like ä,ü,ö or other language specific chraracters in i18n.properties file it is expected that they are displayed as such in the running UI5 application.

Current Behavior

When an Umlaut is used like in "Anträge" it is displayed as "Anträge".

Steps to reproduce the issue

  1. create a text resource in i18n.properties with an Umlaut, e.g. "requests=Anträge" and save the file with UTF-8 charset
  2. use the text resource in a xml view of an UI5 app, e.g. <Text text="{i18n>requests}" />
  3. run the app

This happens when using "ui5 serve" to serve the development state of the app as well as when using "ui5 build" to build the app and then serve the content of the .dist folder with a webserver.

The i18n.properties file is delivered with Content-Type: text/plain; charset=ISO-8859-1.
If I use e.g. WebIDE to run my application the i18n.properties has Content-Type: text/plain

When I save the i18n.properties with charset "ISO 8859-1" and use UI5 tooling to serve the app the result in the browser looks like this: Antr�ge

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 1.4.0
  • Node.js Version: v10.15.0
  • npm Version: 6.6.0
  • OS/Platform: Mac OS Mojave 10.14.4
  • Browser (if relevant): Chrome 74.0.3729.131, Firefox 66.0.3, Safari 12.1
  • Other information:

Affected components (if known)

Log Output / Stack Trace

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions