servoy doesnt save it like that, that escaping is done by the default property file reader of java
And because you have real utf8 chars in them what expands 2 bytes, the properties file reader doesn’t expect that and will interpreted both bytes and will escape both bytes…
If we would have xml support for the messages then you would have utf8, properties should be in iso with the escaped unicode. Maybe we could also change that to utf8 but then all foreign editors should obey that also… Else it will be a mess again.
You can try to put a property in the i18n editor where we can select the charset, and by default to be ISO 8859-1. Isn’t this simple and can solve the problem for both of us?
thats kind of already to late… because we first have to read the property file…
But something like this could be done if really needed, then we just have to read the property file twice when we see that property with another encoding then we just read it in with.
1 thing is for sure then, you have to be certain then again that you will always write that in that encoding… Even if you get it back from what ever source…
Yes, that’s not problem. If I would have the charset option, I can remove all language files, starting over creating them using UTF8, then copy the text back. And it would be my responsibility to past the text correctly.
Actually I worked before at a java project that had internationalization also including Japanese
and I created my own framework for i18n using properties or xml files. The charset I used for the files was UTF8, and I never had any problem with them. I used to receive the translations from translators, and add the texts to the i18n files using built in parsers, especially for the XML files, because I couldn’t send the texts to the translator in XML format
.
So, yes, it would be great if you can support UTF8 charset for the properties files!!!
Please, let me know when it’s done!
Thanks a lot!
you mix up stings.
when i talk about properties file i really talk about .properties and then the files that have key=value pairs in them
You are right if you use XML (which is then default utf8) then it will be fine because the default encoding is different between those 2 kinds of files.
I referred to the same thing when I said about properties files - .properties files/key=value pairs. For example, all i18n properties files that we have now in servoy are UTF8 files, for the translation reasons mention above, except the default english one which is ANSI. At least this is what notepad++ says. Actually the UTF8 files are edited mainly using notepad++.
Though is true, it’s easier using XML files.
But, please let my know if you are going to implement something that can help me, so I can easily import the translations, and also when changing a text using i18n editor from servoy that I don’t get all file transformed using ISO 8859-1 charset with 2 escapes \uXXXX\uXXXX for each char, which will led to inadequate characters display by the server.
Thanks a lot!