Using more than 7 bit ASCII on windows.

François Granger francois.granger at free.fr
Sun Oct 29 08:57:36 EST 2000


Syver Enstad <syver.enstad at sensewave.com> wrote:

> >>> os.chdir('våre dokumenter')
> Traceback (innermost last):
>   File "<interactive input>", line 1, in ?
> OSError: [Errno 2] No such file or directory: 'v\303\245re dokumenter'
> 
> The line above looks very strange to me as it seems that the a with a ring
> over is represented by two characters here, when it was only represented
> with one when calling getcwd

It probably change your coding to UTF-8 where each single char (apart
for the under 128 ones) is coded as two chars.

But on a Mac with Python 2.0 I get this:

>>> os.chdir('HD:')
>>> os.getcwd()
'HD:'
>>> os.chdir('Textes à garder')
>>> os.getcwd()
'HD:Textes \210 garder:'
>>> 

So I don't understand ?

-- 
"Le sol n'oublie rien, il transmet."
- Danièle



More information about the Python-list mailing list