LANG, locale, unicode, setup.py and Debian packaging
"Martin v. Löwis"
martin at v.loewis.de
Sun Jan 13 12:51:06 EST 2008
> What happens if there is a filename that cannot be represented in it's
> entirety? i.e. every character is 'replaced'. Does it simply vanish, or does
> it appear as "?????????" ? :)
The latter. I did open(u"\u20ac\u20ac","w") in an UTF-8 locale, then did
"LANG=C ls", and it gave me ?????? (as the two characters use 6 bytes)
> I spent an hour trying to find a single file on the web that did *not* have
> (what seemed like) ascii characters in it and failed. Even urls on Japanese
> websites use western characters ( a tcp/ip issue I suspect).
Actually, an HTTP and URL issue. Non-ASCII URLs aren't really supported
in the web.
> I was hoping to
> find a filename in Kanji (?) ending in .jpg or something so that I could
> download it and see what my system (and Python) made of it.
Use a text editor instead to create such a file. For example, create
a new document, and save it as "活用事例.txt" (which Google says means
"casestudies.txt")
Regards,
Martin
More information about the Python-list
mailing list