[SOLVED] Transform character encoding issue

Does OpenHAB support international characters for item transforms?

If so, I have a problem: Item text passing a .map transformation is not encoded correctly in the web interface (sitemap).

I’ve created a .map transformation file (sv.map) with non-english characters, UTF-8 encoded (like all other configuration files) and the result looks like this:

The web page html specifies UTF-8 encoding. Labels for sitemap and items are encoded correctly.

OpenHAB 1.8.1 on Windows 7. Latest Chrome and Firefox.

Try using the java utf-8 code, in this case use
OPEN=\u00F6ppen

Ok thanks. With this help I realized the .map files could be regular Java properties files which uses ISO-8859-1 encoding which fully supports my used language (swedish). Using this encoding the text was shown correctly on the web page.

This also explains why the *.items file had no problems since it’s not a Java properties-file.

Btw for languages not supported the native2ascii tool can be used to convert whole files.

1 Like

Just installed openHAB on Linux (Raspbian) and there I had to use UTF-8 for the .map file. Seems Unicode escape characters is required for portablity.

Great!

I had gave up the special character in map!
Just add it to the wiki. This is really useful!
Explanation-of-items