LANG, locale, unicode, setup.py and Debian packaging

Donn donn.ingle at gmail.com
Mon Jan 14 03:19:30 EST 2008


> Can you please type
> paf = ['/home/donn/.fontypython/M\xc3\x96gul.pog']
> f = open(paf, "r")
I think I was getting a ghost error from another try somewhere higher up. You 
are correct, this does open the file - no matter what the locale is. 

I have decided to keep the test for a decode error because files created under 
different locales should not be written-to under the current one. I don't 
know if one can mix encodings in a single text file, but I don't have time to 
find out.

It is getting messy with my test files created in differing locales, and my 
code changing so quickly. 

> See above. The encoding in codecs.open has no effect at all on
> the file name; it only talks about the file content.
Thanks, I suspected as much but it's a subtle thing.

Best,
\d


-- 
"It is almost as if the human brain were specifically designed to 
misunderstand Darwinism, and to find it hard to believe.."
-- Richard Dawkins

Fonty Python and other dev news at:
http://otherwiseingle.blogspot.com/



More information about the Python-list mailing list