Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check whether ISO-8859-1 should still be enforced for .properties files #338

Closed
1 of 6 tasks
RandomByte opened this issue May 23, 2018 · 3 comments
Closed
1 of 6 tasks
Labels
enhancement New feature or request module/ui5-server Related to the UI5 Server module

Comments

@RandomByte
Copy link
Member

Expected Behavior

See SAP-archive/connect-openui5#20

While this might be incompatible to current applications and libraries, we should look into it. A project setting might be already sufficient.

Current Behavior

.properties files are always served with charset ISO-8859-1 (relevant code).

Steps to reproduce the issue

  1. Serve the openui5-sample-app
  2. In the network trace, check the Content-Type header of the requested i18n file:
    screen shot 2018-05-23 at 18 44 55

Context

  • OS/Platform: macOS 10.13.4
  • Node.js Version: v8.11.1
  • npm Version: 5.8.0
  • Browser (if relevant): Chrome 67
  • Other information: -

Affected components

Stack trace/log output

@cschuff
Copy link

cschuff commented Jun 28, 2018

Since it is still Java default behaviour to expect .properties files in ISO-8859-1 I would stick to this behaviour.

Storing .properties files in any other encoding could easily break things in other (productive) enviroments. Therefore I'd prefer to fail early. This will encourage people to to store their .properties files in ISO-8859-1 and to encode special characters with \uXXXX syntax. This is what any intelligent editor would do anyways.

BTW: Files can be converted easily with Java tooling:
native2ascii -encoding UTF-8 i18n-UTF8.properties i18n.properties

@matz3
Copy link
Member

matz3 commented Jul 16, 2019

See #168

@RandomByte
Copy link
Member Author

With UI5 CLI v1.7.0, you can now configure UTF-8 as the source encoding of a projects *.properties files. The default stays at ISO-8859-1. In both cases the UI5 Tooling will escape any non-ASCII characters, so that the build result is independent from the encoding.

📖 Documentation (see propertiesFileSourceEncoding)
🔎 Demo

@RandomByte RandomByte transferred this issue from SAP/ui5-server Nov 20, 2020
@RandomByte RandomByte added enhancement New feature or request module/ui5-server Related to the UI5 Server module labels Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module/ui5-server Related to the UI5 Server module
Projects
None yet
Development

No branches or pull requests

3 participants