roskenet / springboot-javafx-support

SpringBoot / JavaFX8 Integration
MIT License
422 stars 139 forks source link

Support i18n-resource bundles with other encodings than ISO-8859-1 #54

Closed Pyknic closed 6 years ago

Pyknic commented 6 years ago

When translating applications to other languages than English, it is common to have characters outside the English alphabet. Since JavaFX default to using ISO-8859-1 when loading a resource bundle, it means that you would have to escape these characters using \uXXXX when doing the translation. A better option would be to expand the @FXMLView-annotation to take an optional parameter encoding so that the correct encoding for the resource bundle can be specified.

Current translation (example_sv.properties):

ongoing: Pågående

Current apperance (without escaping characters): encoding_before

With escaped characters (example_sv.properties):

ongoing: P\u00E5g\u00E5ende

Apperance when escaped: encoding_after

Pyknic commented 6 years ago

This is fixed in Pull Request #55.