Hi Dan!

have you got this email below? If so, what do you think?

To state the problem more precisely:

This issue happens if wine is installed on the system and also some
apps. The command entries have often signs over ascii 127 if the
user lives outside England or United States. Therefore I think it
is important to implement this fix ...

Thanks,
Thomas

Thomas Funk wrote:
> Hi Dan,
>
> sorry, but I have another patch for fvwm-menu-desktop again ...
>
> On a system with wine the following error occur:
> Traceback (most recent call last):
>   File "./fvwm-menu-desktop.in.py", line 536, in <module>
>     main()
>   File "./fvwm-menu-desktop.in.py", line 213, in main
>     parsemenus(menulist, desktop)
>   File "./fvwm-menu-desktop.in.py", line 429, in parsemenus
>     parsemenu(xdg.Menu.parse(menu), name, title)
>   File "./fvwm-menu-desktop.in.py", line 502, in parsemenu
>     parsemenu(entry)
>   File "./fvwm-menu-desktop.in.py", line 486, in parsemenu
> printmenu(desktop.getName(), desktop.getIcon(), "Exec exec " + " " + execProgram)
>   File "./fvwm-menu-desktop.in.py", line 407, in printmenu
>     printtext('+ "%s%s" %s' % (name, iconfile, command))
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 154: ordinal not in range(128)
>
> This happens because the text will be decoded to utf-8 but there's a sign
> over ascii 127 like ä,ö,ü ... so it fails.
>
> The fix is to encode it to unicode and then decode it with iso-8859-15
> to the correct string.
>
> About this problem see
> http://blog.codekills.net/2008/05/01/encoding-and-decoding-text-in-python-%28or---i-didn%27t-ask-you-to-use-the-%27ascii%27-codec!-%29/


Reply via email to