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

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
michaelmh
Posts: 8

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

Wed Nov 08, 2017 1:22 pm

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
Radu
Posts: 5093

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

Wed Nov 08, 2017 2:26 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
michaelmh
Posts: 8

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

Wed Nov 08, 2017 2:48 pm

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
Radu
Posts: 5093

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

Wed Nov 08, 2017 2:55 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 2 guests