mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Modify locale.localeconv(), time.tzname, os.strerror() and other functions to ignore the UTF-8 Mode: always use the current locale encoding. Changes: * Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or encoding error, they return the position of the error and an error message which are used to raise Unicode errors in PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale(). * Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx(). * PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all cases, especially for the strict error handler. * Add _Py_DecodeUTF8Ex(): return more information on decoding error and supports the strict error handler. * Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex(). * Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx(). * Ignore the UTF-8 mode to encode/decode localeconv(), strerror() and time zone name. * Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use the "current" locale. * Remove _PyUnicode_DecodeCurrentLocale(), _PyUnicode_DecodeCurrentLocaleAndSize() and _PyUnicode_EncodeCurrentLocale(). |
||
|---|---|---|
| .. | ||
| abstract.rst | ||
| allocation.rst | ||
| apiabiversion.rst | ||
| arg.rst | ||
| bool.rst | ||
| buffer.rst | ||
| bytearray.rst | ||
| bytes.rst | ||
| capsule.rst | ||
| cell.rst | ||
| code.rst | ||
| codec.rst | ||
| complex.rst | ||
| concrete.rst | ||
| conversion.rst | ||
| coro.rst | ||
| datetime.rst | ||
| descriptor.rst | ||
| dict.rst | ||
| exceptions.rst | ||
| file.rst | ||
| float.rst | ||
| function.rst | ||
| gcsupport.rst | ||
| gen.rst | ||
| import.rst | ||
| index.rst | ||
| init.rst | ||
| intro.rst | ||
| iter.rst | ||
| iterator.rst | ||
| list.rst | ||
| long.rst | ||
| mapping.rst | ||
| marshal.rst | ||
| memory.rst | ||
| memoryview.rst | ||
| method.rst | ||
| module.rst | ||
| none.rst | ||
| number.rst | ||
| objbuffer.rst | ||
| object.rst | ||
| objimpl.rst | ||
| refcounting.rst | ||
| reflection.rst | ||
| sequence.rst | ||
| set.rst | ||
| slice.rst | ||
| stable.rst | ||
| structures.rst | ||
| sys.rst | ||
| tuple.rst | ||
| type.rst | ||
| typeobj.rst | ||
| unicode.rst | ||
| utilities.rst | ||
| veryhigh.rst | ||
| weakref.rst | ||