| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
|
| |
|
|
|
|
|
|
|
| |
UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no
locale environment variable is set), to avoid inconsistencies with
os.fsencode() and os.fsdecode() functions which are already using
UTF-8/surrogateescape.
|
|\ |
|
| | |
|
|/
|
|
| |
Patch written by Serhiy Storchaka.
|
|
|
|
| |
the os module.
|
|
|
|
| |
SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
|
| |
|
|
|
|
| |
_Py_stat() now returns -2 if an exception was raised.
|
|
|
|
|
|
|
|
|
|
|
| |
* PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() decode a string
from the current locale encoding
* _Py_char2wchar() writes an "error code" in the size argument to indicate
if the function failed because of memory allocation failure or because of a
decoding error. The function doesn't write the error message directly to
stderr.
* Fix time.strftime() (if wcsftime() is missing): decode strftime() result
from the current locale encoding, not from the filesystem encoding.
|
| |
|
|
|
|
| |
Explain in the documentation that conversion errors should never happen.
|
|
|
|
|
|
| |
* Add error_pos optional argument to _Py_wchar2char()
* PyUnicode_EncodeFS() raises a UnicodeEncodeError or MemoryError if
_Py_wchar2char() fails
|
|
|
|
|
|
| |
_Py_char2wchar() callers usually need the result size in characters. Since it's
trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add
an option to get it.
|
|
|
|
| |
surrogate characters.
|
| |
|
|
|
|
| |
surrogate characters.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
On Windows, Py_UNICODE is wchar_t, so we can avoid the expensive Py_UNICODE*
=> wchar_t* conversion.
|
|
|
|
|
|
| |
* Don't define _Py_wstat() on Windows, Windows has its own _wstat() function
with a different API (the stat buffer has another type)
* Include windows.h
|
|
|
|
|
| |
I suppose that I reapplied my local patch creating Python/fileutils.c whereas
the file already existed.
|
|
* _Py_fopen() and _Py_stat() come from Python/import.c
* (_Py)_wrealpath() comes from Python/sysmodule.c
* _Py_char2wchar(), _Py_wchar2char() and _Py_wfopen() come from Modules/main.c
* (_Py)_wstat(), (_Py)_wgetcwd(), _Py_wreadlink() come from Modules/getpath.c
|