Unicode Character in HTTP Post Request

Hello,

I am configuring some rules to send commands to my other home automation system Loxone.
So that then a status change in OpenHab is also sent to Loxone.

For this I use the SendHTTPPostRequest, which I save with Visual Studio Code as a rule file to Openhab.

All other rules with the HttpPostRequests work,
Except this one:

rule "DaikinEG_SetPoint"
when
    Item DaikinEG_SetPoint changed to "18"
then
sendHttpPostRequest("http://username:password@192.168.1.3/dev/sps/io/Klima-EG-API/SET(ACc;ϑt;18)")
end

It is not working because this special unicode character within the string: ϑ
But Loxone requires this Unicode character,
Because this is the name of the input-Interface of this Loxone module. So I have to specify it in the request string.

Unfortunately this does not work.
The Unicode character is not transmitted correctly and then not recognized by Loxone.

If I enter the HTTP string with the character in a web browser, the command is executed correctly in Loxone.

Is there a possibility to change the character set for the transmission, or another possibility to transmit the string correctly?

Does anyone have any experience?

Thanks in advance!
Jaromir

Welcome to the community - URI encoding for ϑ: %CF%91


http%3A%2F%2Fusername%3Apassword%40192.168.1.3%2Fdev%2Fsps%2Fio%2FKlima-EG-API%2FSET%28ACc%3B%CF%91t%3B18%29

Hi Ap15e,

many thanks for the guideline, for the correct encoding to UTF-8!

IT WORKED!!! Yeah!!! Cool, many many thanks!!!

I only needed to modify it a little bit.
Your proposal was somehow not recognized as URL, therefore it was not send to Loxone.

Then I tried to only change ϑ to %CF%91
This works perfectly:

sendHttpPostRequest("http://username:password@192.168.1.3/dev/sps/io/Klima-EG-API/SET(ACc;%CF%91t;18)")

Problem solved!
Great,
Jaromir