Le Monday 29 September 2008 12:50:03 Ulrich Eckhardt, vous avez écrit : > (...) uses an ASCII mapping where possible and codepoints from the > "Private Use Area" (PUA) of Unicode for the non-decodable bytes.
That sounds to me like a very *ugly* hack. It remembers me my proposition to create an object have the API of both bytes and str types: str(<Filename object>) = human representation of the filename, bytes(<Filename>) = original bytes filename. As I wrote in the first email of this thread, it's not a good idea to mix bytes and characters. Why trying to convert bytes to characters when the operating system expects bytes? To get the best compatibility, we have to use the native types, at least when str(filename, fs_encoding) fails and/or str(filename, fs_encoding).encode(fs_encoding) != filename. -- Victor Stinner aka haypo http://www.haypocalc.com/blog/ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com