mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
are now removed, since their effect was inexistent in 3.x (the default encoding is hardcoded to utf-8 and cannot be changed).
This commit is contained in:
parent
b0fa831d1e
commit
fce7fd6426
8 changed files with 4 additions and 90 deletions
|
@ -1784,17 +1784,6 @@ const char *PyUnicode_GetDefaultEncoding(void)
|
|||
return unicode_default_encoding;
|
||||
}
|
||||
|
||||
int PyUnicode_SetDefaultEncoding(const char *encoding)
|
||||
{
|
||||
if (strcmp(encoding, unicode_default_encoding) != 0) {
|
||||
PyErr_Format(PyExc_ValueError,
|
||||
"Can only set default encoding to %s",
|
||||
unicode_default_encoding);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* create or adjust a UnicodeDecodeError */
|
||||
static void
|
||||
make_decode_exception(PyObject **exceptionObject,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue