kdialog and unicode
John Machin
sjmachin at lexicon.net
Tue Apr 26 18:43:58 EDT 2005
On 26 Apr 2005 13:39:26 -0700, dmbkiwi at gmail.com (dumbkiwi) wrote:
>Peter Otten <__peter__ at web.de> wrote in message news:<d4l92e$9di$05$1 at news.t-online.com>...
>> Dumbkiwi wrote:
>>
>> >> Just encode the data in the target encoding before passing it to
>> >> os.popen():
>
>Anyway, from your post, I've done some more digging, and found the
>command:
>
>sys.setappdefaultencoding()
>
>which I've used, and it's fixed the problem (I think).
>
Dumb Kiwi, eh? Maybe not so dumb -- where'd you find
sys.setappdefaultencoding()? I'm just a dumb Aussie [1]; I looked in
the 2.4.1 docs and also did import sys; dir(sys) and I can't spot it.
In any case, how could the magical sys.setappdefaultencoding() fix
your problem? From your description, your problem appeared to be that
you didn't know what encoding to use.
What is the essential difference between
send(u_data.encode('polish'))
and
sys.setappdefaultencoding('polish')
...
send(u_data)
[1]: Now that's *TWO* contenders for TautologyOTW :-)
Cheers,
John
More information about the Python-list
mailing list