i18n.properties responds with wrong charset
See original GitHub issueExpected 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
- create a text resource in i18n.properties with an Umlaut, e.g. “requests=Anträge” and save the file with UTF-8 charset
- use the text resource in a xml view of an UI5 app, e.g. <Text text=“{i18n>requests}” />
- 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)
- [ x ] ui5-builder
- [ x ] ui5-server
- ui5-cli
- ui5-fs
- ui5-project
- ui5-logger
Log Output / Stack Trace
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (7 by maintainers)
I would rate this as a bug in
ui5 serve
.Thx, works if I save the i18n.properties files with ISO-8859-1. Don’t think that this is an international solution but it is ok for me in the European area