Page 1 of 1

Properties editor understands hex but does not create hex for non-ASCII characters

Posted: Wed Nov 08, 2017 1:22 pm
by michaelmh
Hi,

I was glad to see that I can edit a .properties file with OxygenXML and it decoded all hex characters (e.g. \u00FC for ü). Apparently the file name extension is linked to a Properties Editor.

How can I ensure that all non-ASCII characters will be encoded in \u notation, I am pretty sure that this should be possible.

Thanks,
- Michael

Re: Properties editor understands hex but does not create hex for non-ASCII characters

Posted: Wed Nov 08, 2017 2:26 pm
by Radu
Hi Michael,

The encoding in which the properties files are saved is "ISO-8859-1". And in this encoding you can save German characters like "ü" without escaping them.
Oxygen's support for editing properties files will indeed automatically un-escape all "\u" encoded characters before showing you the content. The save operation will percent encode only characters which cannot be encoded in the ISO-8859-1 format. As the "ü" can be saved directly encoded in the ISO-8859-1 format, the save operation will not escape it.
I tested opening a properties file containing an unescaped "ü" in it using the default Java support and there seems to be no problem loading and using it.

Regards,
Radu

Re: Properties editor understands hex but does not create hex for non-ASCII characters

Posted: Wed Nov 08, 2017 2:48 pm
by michaelmh
Radu,

Thanks for the info. I will test whether our application accepts äöü without \u encoding. Until now all such files I saw used that encoding…

- Michael

Re: Properties editor understands hex but does not create hex for non-ASCII characters

Posted: Wed Nov 08, 2017 2:55 pm
by Radu
Hi Michael,

Yes, it would be great if you could give us feedback on this. If you encounter any problem with an application not properly loading the properties files we can consider for example escaping all characters which are not in the a-z and A-Z ranges.

Regards,
Radu