Re: [Pythonmac-SIG] Unicode Filenames on the Mac

2005-07-15 Thread Piet van Oostrum
> Bob Ippolito <[EMAIL PROTECTED]> (BI) wrote: > import sys > sys.getfilesystemencoding() >BI> 'utf-8' It is UTF-8, but you must be careful: the filenames are in normalized (or whatever they call it) UTF-8, meaning that accented letters are split up into the letter followed by the acc

Re: [Pythonmac-SIG] Unicode Filenames on the Mac

2005-07-14 Thread Bob Ippolito
On Jul 14, 2005, at 9:17 AM, Nick Matsakis wrote: > > On Wed, 13 Jul 2005, Bob Ippolito wrote: > > >> HFS actually uses UTF-16 internally, but the POSIX layer is UTF-8. >> It will bite you if you expect the code to work on other platforms. >> Not all platforms use UTF-8 for their filesystem encod

Re: [Pythonmac-SIG] Unicode Filenames on the Mac

2005-07-14 Thread Nick Matsakis
On Wed, 13 Jul 2005, Bob Ippolito wrote: > HFS actually uses UTF-16 internally, but the POSIX layer is UTF-8. > It will bite you if you expect the code to work on other platforms. > Not all platforms use UTF-8 for their filesystem encoding. I don't care about other platforms, but I assume from y

Re: [Pythonmac-SIG] Unicode Filenames on the Mac

2005-07-13 Thread Bob Ippolito
On Jul 13, 2005, at 6:05 PM, Nick Matsakis wrote: > > What is the best way to deal with non-ASCII paths when working with > the > python standard library? Specifically, when using functions like > open() > and the os and glob modules, what should be passed in? What should I > expect out? If

[Pythonmac-SIG] Unicode Filenames on the Mac

2005-07-13 Thread Nick Matsakis
What is the best way to deal with non-ASCII paths when working with the python standard library? Specifically, when using functions like open() and the os and glob modules, what should be passed in? What should I expect out? In experimenting with it, it appears that these libraries accept str ob