This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sys.getfilesystemencoding()
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: loewis, manlioperillo
Priority: normal Keywords:

Created on 2004-06-02 09:15 by manlioperillo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg20979 - (view) Author: Manlio Perillo (manlioperillo) Date: 2004-06-02 09:15
>>> sys.version
'2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit
(Intel)]'
>>> sys.platform
'win32'
>>> sys.getwindowsversion()
(5, 1, 2600, 2, '')

Hi.
In the documentation it is reported that:
'On Windows NT+, file names are Unicode natively, so no
conversion is performed'. 

But:
import sys
>>> sys.getfilesystemencoding()
'mbcs'



Thanks and regards   Manlio Perillo
msg20980 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-06-02 12:40
Logged In: YES 
user_id=21627

The documentation is correct. Filenames are not converted.
msg20981 - (view) Author: Manlio Perillo (manlioperillo) Date: 2004-06-15 20:09
Logged In: YES 
user_id=1054957

I'm not an expert but... mbcs is the encoding used by
Windows 9x.
This is not clear, if the encoding for win NT+ is 'mbcs'
this should be written in the documentation explicitly.
msg20982 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-06-16 04:54
Logged In: YES 
user_id=21627

When filenames need to be converted between byte strings and
unicode strings, "mbcs" is the right encoding even on
Windows NT. Python rarely needs to perform this conversion,
as it passes Unicode strings directly to the operating
system. It might be that applications have the need to
perform the conversion themselves.

I have added a comment in this direction in libsys.tex 1.72.
History
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40327
2004-06-02 09:15:10manlioperillocreate