0

My project has properties files for language dependent texts which are encoded (per default derived from content type) in ISO-8859-1. They are read using ResourceBundle. When I run the application on Android I see non-printable characters (e.g for german umlauts äöü).

When I convert the files to UTF-8 then the presentation on Android is fine but now I see non-printable characters when running the application on the (Windows) desktop.

Is there a way/encoding to keep the same files for Windows and Android ?

user7399085
  • 220
  • 1
  • 12

1 Answers1

0

The following worked for me:

  • convert all properties files that contain non-printables to UTF-8 (e.g. using notepad++)
  • for these set file property in IDE (e.g. Eclipse->file->Properties->Resource->text file encoding) also to UTF-8
  • implement UTF8Control as shown here and use this for all ResourceBundles where its baseName may load an UTF-8 encoded file (Luckily I had only a few places to change in my java code).
  • If a ResourceBundle is passed to FXMLLoader it should also be UTF-8 enabled.
user7399085
  • 220
  • 1
  • 12