Re: system(...) and unicode

2006-05-22 Thread andrew
The impression I got from the link I gave was that exec et al already had the appropriate unicode support; system seems to be the exception. Anyway, thanks for the info - that directory name is coming from a DOM call, and I'm pretty sure it's returning Unicode, so that makes sense. Andrew -- ht

Re: system(...) and unicode

2006-05-22 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > Hmmm. After reading > http://kofoto.rosdahl.net/trac/wiki/UnicodeInPython I tried: > > system(cmd.encode(getfilesystemencoding())) > > which works (nothing else changed). But that seems odd - is this a bug > (the asymmetry - I read files with os.listdir with n

Re: system(...) and unicode

2006-05-22 Thread andrew
Hmmm. After reading http://kofoto.rosdahl.net/trac/wiki/UnicodeInPython I tried: system(cmd.encode(getfilesystemencoding())) which works (nothing else changed). But that seems odd - is this a bug (the asymmetry - I read files with os.listdir with no explicit unicode handling, but need t

system(...) and unicode

2006-05-22 Thread andrew
Hi, I'm seeing the following error: ... system(cmd) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 57: ordinal not in range(128) and I think I vaguely understand what's going on - "cmd" is constructed to include a file name that is UTF-8 encoded (I think - it