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.

Can I log HTML characters or get webserver to behave on ├ª├©├Ñ?

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

Can I log HTML characters or get webserver to behave on ├ª├©├Ñ?

Post by Mastiff »

I get this error messages in the webserver when I try to use Norwegian special characters like ├© in a variable that is used in a webpage:

Code: Select all

11:43:01   Webserver error /
11:43:01   Exception 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)
11:43:01   Webserver: Exception on handle_one_request: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)
That means that I can't see the web page at all. I asked about this a year or so ago, but I didn't get an answer back then. So I have been using "Hjørnesoverom" instead of "Hj├©rnesoverom" to get the web page right in the meantime. But that does of course mess up the logging output when I'm doing a printout:

Code: Select all

11:43:46            Hjørnesoverom.: Temperatur: 15.9, termostattemperatur: 5, tidspunkt: Kl. 11:43, den 18.01.
Is it possible to get the logger to print ø as an ├©? Or even better, is it possible to fix the webserver problem that gives me the error message?
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Can I log HTML characters or get webserver to behave on

Post by Mastiff »

Fixed by using u'Room' in the main variable. Thanks, Pako! :mrgreen:
Post Reply