Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

String encode/decode question

If you have a question or need help, this is the place to be.
Post Reply
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

String encode/decode question

Post by Mastiff »

I am trying to get webserver to print ├ª├©├Ñ (Norwegian special characters). I had a tip that using this code in the webpage would do that:

Code: Select all

{{str(eg.globals.Rom[4]).decode('latin-1').encode("utf-8")}}
But that gives me this error:

Code: Select all

10:50:48   Webserver error /
10:50:48   Exception 'str' is undefined
10:50:48   Webserver: Exception on handle_one_request: 'str' is undefined
Can anybody see what the reason for that is? The variable eg.globals.Rom[4] is defined, so I can only think that there's an error in the statement or the way it's parsed to EG.
Post Reply