Page 1 of 1

[FIXED] OSD - Unicode Encode Error

Posted: Wed May 14, 2008 1:01 pm
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

Re: OSD - Unicode Encode Error

Posted: Thu May 15, 2008 3:23 pm
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.

Re: OSD - Unicode Encode Error

Posted: Fri May 16, 2008 5:11 pm
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.