eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
159 stars 109 forks source link

Migrate messages properties files to UTF-8 #5245

Closed BalusC closed 10 months ago

BalusC commented 1 year ago

Since Java9 properties files are (finally) by default read using UTF-8 instead of ISO-8859-1.

So, since Faces 4 supports Java11 instead of Java8, we should be able to migrate them in order to get rid of illegible Unicode escape sequences in for example the French and Chinese message bundles such as seen in this PR: https://github.com/eclipse-ee4j/mojarra/pull/5243/files#diff-259fe9f794427cd476baa91adc4048d19cffb09922888ba234afcc30eff4cff5

BalusC commented 10 months ago

This is in hindsight less trivial than anticipated. When I migrate them then the tooling (both Eclipse and IntelliJ -- no Netbeans here) stubbornly still attempt to read them using ISO-8859-1 even though the project is configured with Java 9+ and therefore they present UTF-8 encoded properties files as mojibake in their editor and I cannot seem to find any configuration setting to reinstruct the IDE to interpret them as UTF-8. This is very inconvenient when you want to edit them. It looks like that the tooling in its current state is completely unaware of this Java 9 change.

If we migrate then we should reinstruct the devs to edit properties files outside Eclipse/IntelliJ or to reconfigure their IDEs to disable the built-in properties file editor. And I'm not terribly torn on this.

melloware commented 10 months ago

I have run into this issue too and I end up editing these files in Notepad++ because Eclipse always messes them up.

mnriem commented 10 months ago

@BalusC Were you able to complete this?

pzygielo commented 10 months ago

This is in hindsight less trivial than anticipated. When I migrate them then the tooling (both Eclipse and IntelliJ -- no Netbeans here) stubbornly still attempt to read them using ISO-8859-1

Please report to JetBrains if that setting image does not work for you. It works fine for me.

BalusC commented 10 months ago

This is in hindsight less trivial than anticipated. When I migrate them then the tooling (both Eclipse and IntelliJ -- no Netbeans here) stubbornly still attempt to read them using ISO-8859-1

Please report to JetBrains if that setting image does not work for you. It works fine for me.

Fabulous, that indeed worked! I couldn't find that.

BalusC commented 10 months ago

@BalusC Were you able to complete this?

On second thought I'll prep the PR nonetheless.

BalusC commented 10 months ago

@manfredriem I picked 4.1 instead of 4.0 because I feel like this change warrants another minor version. Feel free to retarget 4.0 instead.