[Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces (original) (raw)

Glenn Linderman v+python at g.nevcal.com
Tue Apr 28 01:46:06 CEST 2009


On approximately 4/27/2009 12:48 PM, came the following characters from the keyboard of Martin v. Löwis:

There are still issues regarding how Windows and POSIX programs that are sharing cross-mounted file systems might communicate file names between each other, which is not at all clear from the PEP. If this is an insoluble or un-addressed issue, it should be stated. (It is probably insoluble, due to there being multiple ways that the cross-mounted file systems might translate names; but if there are, can we learn something from the rules the mounting systems use, to be compatible with (one of) them, or not.

I'd say that's out of scope. A windows filesystem mounted on a UNIX host should probably be mounted with a mapping to translate the Windows Unicode names into whatever the sysadmin deems the locally most apt byte encoding. But sys.getfilesystemencoding() is based on the current user's locale settings, which need not be the same. And if it were, what would it do with files that can't be encoded with the locally most apt byte encoding? As Cameron says: it's out of the scope of the PEP. It really depends how the operating system deals with them. Most likely, the files are not accessible - not only not from Python, but also not accessible from any other Unix program. Details depend on the specific operating system software being used, and the specific parameters passed to it.

I'm not suggesting the PEP should solve the problem of mounting foreign file systems, although if it doesn't it should probably point that out.
I'm just suggesting that if the people that write software to solve the problem of mounting foreign file systems have already solved the naming problem, then it might be a source of a good solution. On the other hand, it might be the source of a mediocre or bad solution. However, if those mounting system have good solutions, it would be good to be compatible with them, rather than have yet another solution. It was in that sense, of thinking about possibly existing practice, and leveraging an existing solution, that caused me to bring up the topic.

-- Glenn -- http://nevcal.com/

A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking



More information about the Python-Dev mailing list