[Python-checkins] r84203 - in python/branches/py3k: Doc/using/cmdline.rst Doc/whatsnew/3.2.rst Modules/main.c

victor.stinner python-checkins at python.org
Thu Aug 19 13:36:43 CEST 2010


Author: victor.stinner
Date: Thu Aug 19 13:36:43 2010
New Revision: 84203

Log:
PYTHONFSENCODING is not available on Windows or Mac OS X


Modified:
   python/branches/py3k/Doc/using/cmdline.rst
   python/branches/py3k/Doc/whatsnew/3.2.rst
   python/branches/py3k/Modules/main.c

Modified: python/branches/py3k/Doc/using/cmdline.rst
==============================================================================
--- python/branches/py3k/Doc/using/cmdline.rst	(original)
+++ python/branches/py3k/Doc/using/cmdline.rst	Thu Aug 19 13:36:43 2010
@@ -447,6 +447,10 @@
    If this is set before running the interpreter, it overrides the encoding used
    for the filesystem encoding (see :func:`sys.getfilesystemencoding`).
 
+   This variable is not available (ignored) on Windows and Mac OS X: the
+   filesystem encoding is pinned to ``'mbcs'`` on Windows and ``'utf-8'`` on
+   Mac OS X.
+
    .. versionadded:: 3.2
 
 

Modified: python/branches/py3k/Doc/whatsnew/3.2.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.2.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.2.rst	Thu Aug 19 13:36:43 2010
@@ -242,7 +242,9 @@
 
 The filesystem encoding can be specified by setting the
 :envvar:`PYTHONFSENCODING` environment variable before running the interpreter.
-The value should be a string in the form ``<encoding>``, e.g. ``utf-8``.
+The value is an encoding name, e.g. ``iso-8859-1``. This variable is not
+available (ignored) on Windows and Mac OS X: the filesystem encoding is pinned
+to ``'mbcs'`` on Windows and ``'utf-8'`` on Mac OS X.
 
 The :mod:`os` module has two new functions: :func:`os.fsencode` and
 :func:`os.fsdecode`.

Modified: python/branches/py3k/Modules/main.c
==============================================================================
--- python/branches/py3k/Modules/main.c	(original)
+++ python/branches/py3k/Modules/main.c	Thu Aug 19 13:36:43 2010
@@ -94,13 +94,15 @@
 PYTHONPATH   : '%c'-separated list of directories prefixed to the\n\
                default module search path.  The result is sys.path.\n\
 ";
-static char *usage_5 = "\
-PYTHONHOME   : alternate <prefix> directory (or <prefix>%c<exec_prefix>).\n\
-               The default module search path uses %s.\n\
-PYTHONCASEOK : ignore case in 'import' statements (Windows).\n\
-PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n\
-PYTHONFSENCODING: Encoding used for the filesystem.\n\
-";
+static char *usage_5 =
+"PYTHONHOME   : alternate <prefix> directory (or <prefix>%c<exec_prefix>).\n"
+"               The default module search path uses %s.\n"
+"PYTHONCASEOK : ignore case in 'import' statements (Windows).\n"
+"PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n"
+#if !(defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)) && !defined(__APPLE__)
+"PYTHONFSENCODING: Encoding used for the filesystem.\n"
+#endif
+;
 
 FILE *
 _Py_wfopen(const wchar_t *path, const wchar_t *mode)


More information about the Python-checkins mailing list