> Well since unfortunately the encoding of a property file is set as ISO-8859-1
> in it spec,
At least for JDK 11 the API says the opposite :
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/PropertyResourceBundle.html,
see the API paragraph.
And indeed it's what I experiment: if I use ResourceBundle.getBundle(Class,
Module),getString(key), it does automatically read UTF-8 or ISO strings (I made
a test with both encodings in a single.properties file).
If I use NbBundle.getMessage() then it always expects ISO, that's why I don't
use it. The problem is that I can't alter the behavior of the Netbeans internal
stuff which still works the "old way". This impacts branding localization or
action displayname declared via @ActionRegistration(lazy=true).
> I'd use a generator step in the build which would translate the UTF-8
> characters into \uxxxx of the final Bundle.properties.
Yes, this is what I should try in the meantime... I'm not familiar with the And
build-script, which target should I start with ?
Le lundi 21 décembre 2020 à 16:14:33 UTC+1, Laszlo Kishalmi
<[email protected]> a écrit :
Well since unfortunately the encoding of a property file is set as ISO-8859-1
in it spec, I'd use a generator step in the build which would translate the
UTF-8 characters into \uxxxx of the final Bundle.properties.
On 12/21/20 6:56 AM, Jerome Lelasseux wrote:
I use the crowdin.com platform (free for open-source!) to get the translations
done for my Netbeans RCP application. It gets synchronized automatically to
GitHub nicely.
The problem is that I pull UFT-8 encoded Bundle*.properties, and the RCP
platform expects ISO-8859-1 encoding, so special characters got messed up.
Do you guys have experience how to integrate this seamlessly ? (ideally by
programmatically alter the behavior of the RCP framework so that UFT-8 is used
to read .properties)
Thanks. Jerome