Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Enforcing ISO-8859-1 on .properties causes issues #20

Closed
enzo1982 opened this issue Nov 17, 2017 · 2 comments
Closed

Enforcing ISO-8859-1 on .properties causes issues #20

enzo1982 opened this issue Nov 17, 2017 · 2 comments

Comments

@enzo1982
Copy link

enzo1982 commented Nov 17, 2017

In lib/properties.js the ISO-8859-1 charset is forced upon all .properties files. This makes it difficult to use them for i18n with non-Latin based languages and causes issues even with Latin based ones (when the server you're deploying to sets UTF-8 by default).

In our development environment we are disabling that content type header or set it to UTF-8 in order to be able to do i18n without such issues and restrictions.

I realize that .properties files orginally come from Java and were defined to be ISO-8859-1 encoded in earlier Java versions. With Java 9, however, the default encoding for .properties files changed to UTF-8 (see JEP 226), so if there ever was a reason to enforce ISO-8859-1 encoding on them, it should be gone now.

Regarding ISO-8859-1 on .properties files, the SAP UI5 coding guidelines say "This is the status quo. As this causes issues, it may be subject to change.".

So what do you think about changing it now and setting the content type header to UTF-8 or removing the explicit header altogether? I think removing the header would come closest to the Java 9 behavior as it would leave charset detection to the browser and allow everyone to use either UTF-8 or ISO-8859-1.

@RandomByte
Copy link
Contributor

I created https://github.com/SAP/ui5-server/issues/7 to also check on this in the context of the new build tooling.

@matz3
Copy link
Contributor

matz3 commented Jul 16, 2019

We are working on a concept to better handle encoding of properties files in the new tooling: SAP/ui5-tooling#168

For this project we currently don't plan to change how properties files are handled, therefore closing as wontfix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants