Message150068
On 22 December 2011 13:15, STINNER Victor <report@bugs.python.org> wrote:
> You cannot pass directly "h\xe9.txt", but if you know the "correct" file system encoding, you can encode it explicitly using str.encode("utf-8").
My recollection was that there were some cases where you couldn't do
this, but perhaps I was wrong or perhaps they're all fixed in
python3.x, or at least perhaps they are better fixed as individual
bugs. gz may know more.
> You are trying to do something complex (add hacks for filenames, for a specific configuration) for a simple problem: configure correctly locales.
I think you may be right.
> If you know and you are sure that your are using UTF-8, why not
> simply setting your locale to a UTF-8 locale?
_My_ locale is set properly. The problem is all the other people in
the world who do not have their locale set to match their files on
disk; telling them each to fix it is tedious. But perhaps the OS is
the best place to address that, when the incorrect locale is just
accidental not unavoidable. |
|
Date |
User |
Action |
Args |
2011-12-22 02:32:20 | poolie | set | recipients:
+ poolie, pitrou, vstinner, vila, benjamin.peterson, r.david.murray, gz |
2011-12-22 02:32:20 | poolie | link | issue13643 messages |
2011-12-22 02:32:20 | poolie | create | |
|