Printing Filenames with non-Ascii-Characters
Marian Aldenhövel
marian at mba-software.de
Wed Feb 2 05:56:44 EST 2005
Hi,
> Have you set the coding cookie in your file?
Yes. I set it to Utf-8 as that's what I use for all my development.
> Try adding this as the first or second line.
>
> # -*- coding: cp850 -*-
>
> Python will then know how your file is encoded
That is relevant to the encoding of source-files, right? How does it affect
printing to standard out?
If it would I would expect UTF-8 data on my console. That would be fine, it
can encode everything and as I have written in another posting in my case
garbled data is better than termination of my program.
But it uses 'ascii', at least if I can believe the error message it gave.
Ciao, MM
--
Marian Aldenhövel, Rosenhain 23, 53123 Bonn. +49 228 624013.
http://www.marian-aldenhoevel.de
"There is a procedure to follow in these cases, and if followed it can
pretty well guarantee a generous measure of success, success here
defined as survival with major extremities remaining attached."
More information about the Python-list
mailing list