• Victor Stinner's avatar
    bpo-29240: Fix locale encodings in UTF-8 Mode (#5170) · 7ed7aead
    Victor Stinner yazdı
    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().
    7ed7aead
Adı
Son kayıt (commit)
Son güncelleme
..
abstract.rst Loading commit data...
allocation.rst Loading commit data...
apiabiversion.rst Loading commit data...
arg.rst Loading commit data...
bool.rst Loading commit data...
buffer.rst Loading commit data...
bytearray.rst Loading commit data...
bytes.rst Loading commit data...
capsule.rst Loading commit data...
cell.rst Loading commit data...
code.rst Loading commit data...
codec.rst Loading commit data...
complex.rst Loading commit data...
concrete.rst Loading commit data...
conversion.rst Loading commit data...
coro.rst Loading commit data...
datetime.rst Loading commit data...
descriptor.rst Loading commit data...
dict.rst Loading commit data...
exceptions.rst Loading commit data...
file.rst Loading commit data...
float.rst Loading commit data...
function.rst Loading commit data...
gcsupport.rst Loading commit data...
gen.rst Loading commit data...
import.rst Loading commit data...
index.rst Loading commit data...
init.rst Loading commit data...
intro.rst Loading commit data...
iter.rst Loading commit data...
iterator.rst Loading commit data...
list.rst Loading commit data...
long.rst Loading commit data...
mapping.rst Loading commit data...
marshal.rst Loading commit data...
memory.rst Loading commit data...
memoryview.rst Loading commit data...
method.rst Loading commit data...
module.rst Loading commit data...
none.rst Loading commit data...
number.rst Loading commit data...
objbuffer.rst Loading commit data...
object.rst Loading commit data...
objimpl.rst Loading commit data...
refcounting.rst Loading commit data...
reflection.rst Loading commit data...
sequence.rst Loading commit data...
set.rst Loading commit data...
slice.rst Loading commit data...
stable.rst Loading commit data...
structures.rst Loading commit data...
sys.rst Loading commit data...
tuple.rst Loading commit data...
type.rst Loading commit data...
typeobj.rst Loading commit data...
unicode.rst Loading commit data...
utilities.rst Loading commit data...
veryhigh.rst Loading commit data...
weakref.rst Loading commit data...