Hi Ede, I start to think that I am on a safe side with the Finnish language files. All the special characters in the file are Unicode escaped like the translation "Päätä piirtäminen" in string com.vividsolutions.jump.workbench.ui.cursortool.MultiClickTool.finish-drawing=P\u00e4\u00e4t\u00e4 piirt\u00e4minen
If I understand right all the characters in the file are the just the same as ISO-8859-1 and UTF-8. And .properties files seem to be plain text files without any character set headers or magic strings so change into UTF-8 would not really change anything. It seems like the Finnish translation could be OK even without Unicode escapes because all the few special characters we have (åäöÅÄÖ) belong to the ISO-8859-1 set https://www.w3schools.com/charsets/ref_html_8859.asp like "small a, umlaut mark" https://www.w3schools.com/charsets/tryit.asp?deci=228&ent=auml. But in that case change from 8859-1 into UTF-8 would break the translations. I was reading that Java 9 supports UTF-8 properties so I made some tests with Unicode escapes, native 8859-1 characters, and UTF-8 characters. Unicode escapes: OK with Java 8 OK with Java 11 Native 8859-1: OK with Java 8 Garbled with Java 11 UTF-8: Garbled with Java 8 OK with Java 11 Thus I think that as long as we support Java 8 the properties files should use Unicode escapes everywhere. -Jukka- -----Alkuperäinen viesti----- Lähettäjä: edgar.sol...@web.de <edgar.sol...@web.de> Lähetetty: tiistai 9. marraskuuta 2021 20.16 Vastaanottaja: jump-pilot-devel@lists.sourceforge.net Aihe: Re: [JPP-Devel] How to edit properties files in GitHub right? On 09.11.2021 18:49, Rahkonen Jukka (MML) wrote: > Hi, hey Jukka, > I was about to add some missing translations into Finnish language file in > GitHub but I noticed this warning: > > "We've detected the file encoding as ISO-8859-1. When you commit changes we > will transcode it to UTF-8." neat of github webui to warn! i'm surprised, positively. > However, with Java properties files I think that should not be done because > Java "properties files should be encoded in ISO 8859-1 character encoding. > Characters that cannot be directly represented in this encoding can be > written using Unicode escapes" (from > https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Properties.html). correct > What is the right method to edit the language files and not to mess the right > character encoding? Should I edit the whole file outside GitHub and replace > the whole jump_fi.properties file? And if so, how to replace files in GitHub? as the github webui fails, the only proper way is to use a git client, clone the repo edit and push. but actually the ISO9959-1 is a legacy and there are lot's of reasons to switch the repo over to UTF-8 (especially the ease of use to international contributers). maybe you wanna wait for that? additionally, of course 1. you can download a snapshot containing a lang/ folder or download the file from github 2. do the edits 3. post it here and me or Mike will commit it then. hope that helped.. healthy regards ede _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel