texterify
texterify copied to clipboard
Special characters in properties
Hey!
I have the issue that my special characters gets converted into unicode characters, and that will not work in our application.
Is there a way to bypass this? Or is there going to be a way to bypass this?
It's currently converting both keys and translations. (Notice I am using java properties files)
FYI; We are using self-hosted docker version.
Hey, can you give an example for which special characters get converted into unicode characters? Unicode is more or less the standard so I would also be really interested how this breaks your application? 🙂
We have characters like Æ Ø Å and other special languagespecific characters (like Chinese signs).
å fx. get's converted to \u00e5 and ø to \u00f8.
We expect those to come out as Æ Ø Å, both in keys as well as values.
In why this breaks our application, then it's because it can't find the key when a character is converted.
If you still want the conversion, maybe it could be a setting on the export config?
Sorry for the late response.
The library we are using for exporting it to a Java .properties
file automatically encodes special characters as it seems like it's best practice for .properties
files (see https://github.com/jnbt/java-properties#encodings-and-special-chars and https://docs.oracle.com/javase/1.5.0/docs/api/java/util/Properties.html#load%28java.io.InputStream). Although it is not documented in the README it seems like this escape procedure can be disabled (see https://github.com/jnbt/java-properties/blob/master/lib/java-properties/generating/generator.rb). If this is the case I will add an option to disable this escape procedure but I can't give you a timeline on that. I'm open to pull requests.
Maybe there is a way it also works with escaped characters in your project as it seems to be best practice?