[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-08-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93a798c7f270 by Victor Stinner in branch 'default': Issue #18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`, rename http://hg.python.org/cpython/rev/93a798c7f270 New changeset 94d0e842b9ea by Victor Stinner in branch 'default': Issue

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-08-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18395 ___

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-07-18 Thread STINNER Victor
STINNER Victor added the comment: You seem to need wchar_t to call Py_Main and Py_SetProgramName. Yes, exactly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18395 ___

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-07-17 Thread Thomas Kluyver
Changes by Thomas Kluyver tak...@gmail.com: -- nosy: +takluyver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18395 ___ ___ Python-bugs-list

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-07-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: How often do people need to convert to do platform independent locale encoding before Python is initialized? Encouraging use of platform dependent wchar_t's seems like a bad idea when PyUnicode abstracts away the difference ever since 3.3 released.

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2014-07-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: You seem to need wchar_t to call Py_Main and Py_SetProgramName. I think there's an example in the docs which is wrong, because it appears to pass a char* to Py_SetProgramName: https://docs.python.org/3.4/extending/embedding.html#very-high-level-embedding

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2013-07-07 Thread STINNER Victor
New submission from STINNER Victor: The Python C API has two very useful functions: _Py_char2wchar() and _Py_wchar2char(). They must be used to handle correctly undecodable byte sequences. _Py_char2wchar() and _Py_wchar2char() use the surrogateescape error handler (PEP 383). _Py_char2wchar()

[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public

2013-07-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18395 ___ ___ Python-bugs-list mailing