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

Unit test for character encodings in property files #6331

Open
solth opened this issue Nov 29, 2024 · 0 comments
Open

Unit test for character encodings in property files #6331

solth opened this issue Nov 29, 2024 · 0 comments
Labels

Comments

@solth
Copy link
Member

solth commented Nov 29, 2024

Is your feature request related to a problem? Please describe.
The character encoding of property files like messages_de.properties and messages_es.properties containing the German and Spanish translations is sometimes changed accidentally in the repository. This leads to special characters not being displayed correctly with the assumed character encoding of UTF-8.

Describe the solution you'd like
Taking a cue from #6293 (comment) a unit test should be added that automatically checks whether the message files are commited with the correct encoding. This could be done by decoding messages with known special characters from the property files with UTF-8 and checking whether the result is displayed correctly, matches prepared string containing these special characters. Since the test would need to check the property files not from test/resources, but from the main/resources directory, this should probably be added to test ressources, as described here.

Additional context
The problem with the wrong character encodings is described in #6324

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

Successfully merging a pull request may close this issue.

1 participant