Hello OH Community,
I am using OH2 atm and added some special unicode characters to my transform files, so that they will look pretty on my sitemap. Unfortunatly I had some problems with APT installed version from the repository, It could’nt read the unicode symbols properly. The tar.gz archive version runs well with unicode symbols (ofc same OH release).
I figured out what the actual difference is in both versions: It’s the file encoding JVM property.
I started the archive version from command line and because Im using a unicode locale (en_US.UTF-8) the encoding gets passed to the JVM. On systemd service unit the terminal locale doesn’t matter.
If it’s correct that each file should be treated with UTF-8 encoding regardless of operating system or implementation, then you’d be able to find the setenv parameter here (Unix/Mac) and here (Windows). If it’s safe to assume that any config file can be UTF-8 encoded, then please feel free to make a PR for others to review
However, if this depends on the user’s specific setup, the best place to set it so that it does not get overwritten is in the /etc/default/openhab2 file as you mentioned in the first post.