question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i18n.properties responds with wrong charset

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
codeworriorcommented, Jun 11, 2019

I would rate this as a bug in ui5 serve.

0reactions
htammencommented, Jun 26, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

SAP/ui5-tooling - i18n.properties responds with wrong charset
So when I save my i18n.properties files with ISO-8859-1 encoding the output of the serve and build commands should be correct. But as...
Read more >
i18n strange encoding - SAP Community
A Deeper search and I found a way to convert the properties file. As the properties file needs to be in escape Unicode...
Read more >
i18n with UTF-8 encoded properties files in JSF 2.0 application
The problem is that I see gibberish on the screen instead of the correct text. First of all I have defined bundles (*_locale.properties)...
Read more >
Problem with UTF-8 encoding in i18n files
I have a problem with special characters in a UTF-8-encoded i18n file. ... with two properties files (i18n.properties and i18n_fr.properties ...
Read more >
Setting the HTTP charset parameter - W3C
In Internet Services Manager, right-click "Default Web Site" (or the site you want to configure) and go to "Properties" => "HTTP Headers" =>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found