[Python-3000] [Python-Dev] Filename as byte string in python 2.6 or 3.0?
Guido van Rossum
guido at python.org
Wed Oct 1 22:29:39 CEST 2008
On Wed, Oct 1, 2008 at 12:14 PM, Glenn Linderman <v+python at g.nevcal.com> wrote:
> The original byte string must be preserved for use in actually opening
> files. How it is displayed is another question. Doing something that
> works for both Unicode display and access to the file is basically
> impossible in all cases. Providing an encapsulation of the byte string
> that has display methods, together with new methods to transform the
> file path, and use parts of it to create other file paths, is the
> solution I described earlier. Using the display string (what existing
> programs are likely to do) for transformations instead of the new
> methods will work for files with Unicode file names, and break for
> others. As long as the solution of new transformation methods is made
> available, there is a migration path for people that encounter
> problems. I think handling files containing Unicode names properly and
> compatibly, together with a migration path for file not in Unicode is
> about the best that can be expected.
The low-level solution(s) we'll be making available in 3.0 should
enable you to implement this and many other higher-level approaches.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list