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.

[FIXED] OSD - Unicode Encode Error

Found a bug in EventGhost? Report it here.
Post Reply
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

[FIXED] OSD - Unicode Encode Error

Post by Pako »

Since Build 1397 (multiline OSD):

Code: Select all

14:51:22   Error in Action: "Show OSD: {eg.result}"
14:51:22   Traceback (most recent call last) (1399):
14:51:22     File "d:\Programs\E\EventGhost\eg\Classes\ActionClass.py", line 156, in CallWrapper
14:51:22     File "d:\Programs\E\EventGhost\plugins\EventGhost\ShowOSD.py", line 412, in __call__
14:51:22   UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 7: ordinal not in range(128)
Pako
Attachments
EG_OSD_Unicode error.jpg
CHeitkamp
Plugin Developer
Posts: 49
Joined: Sun Jan 27, 2008 12:42 pm
Location: M├╝nster / Germany

Re: OSD - Unicode Encode Error

Post by CHeitkamp »

Removing line 412 from plugins/EventGhost/ShowOSD.py seems to fix it.

Code: Select all

osdText = osdText.decode('string_escape')
After removal newline and umlaut-characters still working.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: OSD - Unicode Encode Error

Post by Bitmonster »

Actually it would need to be:

Code: Select all

osdText = osdText.encode("utf-8").decode('string_escape').decode("utf-8")
because the intention was to allow Python string escapes like \n and so on. But I guess we can drop this support, so I have removed the line.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply