String value encoding utf-8 to iso-8859-1

Hi! I’m connecting OSMC to OpenHAB and first of all created “Now Playing: [%s]”.

I did:
String OSMC_Playing “Now Playing: [%s]” {xbmc="<[#mainOSMC|Player.Title]"}

API is working fine, but string value looks like:

OSMC_Playing state updated to Китайский квартал

I’m using Russian Language in OSMC, as I can see the result is in UTF-8, but OpenHAB can’t convert it correctly into, for example, ISO-8859-1. It should look like:

OSMC_Playing state updated to Китайский квартал

I’ve tried to change locales on my OSMC (running on RPi 2), and reached some progress - filenames in bash console new looks ok and and I can type with “RU” letters (previously I couldn’t do even that), but in OpenHAB there is still an issue.

Trying to find out what is wrong I tried to debug simply with curl:

curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.GetItem", "params": {"properties": ["title"], "playerid": 1}}' 'http://192.168.0.99/jsonrpc'

And I get right response:
{"id":1,"jsonrpc":"2.0","result":{"item":{"id":155,"label":"Миньоны","title":"Миньоны","type":"movie"}}}

But in events.log (and on webpage) I still see:
OSMC_Playing state updated to МиньонÑ

Now I’ve set locale on Raspbian where OpenHAB installed to
en_US.ISO-8859-1
and now in events.log I see correct letters:

OSMC_Playing state updated to Миньоны

But in web I still get garbage:

Now Playing: МиньонÑ

Please guys, I feel resolving is near, help!

Alright I have an update.

When in browser open hostname/openghab.app
I see charset=utf-8 inside page source, also Content-Type HTTP response header is charset=utf-8.

Ok, I’ve installed nginx as proxy and replaced Content-Type: header with charset=iso-8859-1 - characters on webpage were changed to another bad symbols - good point to start. BUT I’ve tried all charsets I know and could find - nothing give me good result. I’ve tried change View options in Firefox also - no result.

I really need help.

Any help, please?

I’ve got similar problem with french character “é”, “è”. Those character are remplaced by � in openhab logfile. My solution was to open my openhab .map file with an external editor, and save it with iso-8859 encoding. Now those character are corect in openhab log, but in the designer they are remplaced by �. It’s not the best solution, maybe somebody get a better solution?

Tom

Also, there is information about character encoding in the wiki page

Look at the “Label text” and “transfomation” section.

There is also an other person asking for similar issue:

Hope It help!

@Egor_Sushkov
Did you manage to solve it?

I’m having the same problem and still stuck at the same point you are…:frowning: