Lines Matching refs:fs_codec
475 if (!interp->unicode.fs_codec.encoding) { in unicode_check_encoding_errors()
3859 struct _Py_unicode_fs_codec *fs_codec = &interp->unicode.fs_codec; in PyUnicode_EncodeFSDefault() local
3860 if (fs_codec->utf8) { in PyUnicode_EncodeFSDefault()
3862 fs_codec->error_handler, in PyUnicode_EncodeFSDefault()
3863 fs_codec->errors); in PyUnicode_EncodeFSDefault()
3866 else if (fs_codec->encoding) { in PyUnicode_EncodeFSDefault()
3868 fs_codec->encoding, in PyUnicode_EncodeFSDefault()
3869 fs_codec->errors); in PyUnicode_EncodeFSDefault()
4096 struct _Py_unicode_fs_codec *fs_codec = &interp->unicode.fs_codec; in PyUnicode_DecodeFSDefaultAndSize() local
4097 if (fs_codec->utf8) { in PyUnicode_DecodeFSDefaultAndSize()
4099 fs_codec->error_handler, in PyUnicode_DecodeFSDefaultAndSize()
4100 fs_codec->errors, in PyUnicode_DecodeFSDefaultAndSize()
4104 else if (fs_codec->encoding) { in PyUnicode_DecodeFSDefaultAndSize()
4106 fs_codec->encoding, in PyUnicode_DecodeFSDefaultAndSize()
4107 fs_codec->errors); in PyUnicode_DecodeFSDefaultAndSize()
16246 struct _Py_unicode_fs_codec *fs_codec = &interp->unicode.fs_codec; in init_fs_codec() local
16247 PyMem_RawFree(fs_codec->encoding); in init_fs_codec()
16248 fs_codec->encoding = encoding; in init_fs_codec()
16250 fs_codec->utf8 = (strcmp(encoding, "utf-8") == 0); in init_fs_codec()
16251 PyMem_RawFree(fs_codec->errors); in init_fs_codec()
16252 fs_codec->errors = errors; in init_fs_codec()
16253 fs_codec->error_handler = error_handler; in init_fs_codec()
16256 assert(fs_codec->utf8 == 1); in init_fs_codec()
16265 if (_Py_SetFileSystemEncoding(fs_codec->encoding, in init_fs_codec()
16266 fs_codec->errors) < 0) { in init_fs_codec()
16309 _PyUnicode_FiniEncodings(struct _Py_unicode_fs_codec *fs_codec) in _PyUnicode_FiniEncodings() argument
16311 PyMem_RawFree(fs_codec->encoding); in _PyUnicode_FiniEncodings()
16312 fs_codec->encoding = NULL; in _PyUnicode_FiniEncodings()
16313 fs_codec->utf8 = 0; in _PyUnicode_FiniEncodings()
16314 PyMem_RawFree(fs_codec->errors); in _PyUnicode_FiniEncodings()
16315 fs_codec->errors = NULL; in _PyUnicode_FiniEncodings()
16316 fs_codec->error_handler = _Py_ERROR_UNKNOWN; in _PyUnicode_FiniEncodings()
16357 _PyUnicode_FiniEncodings(&state->fs_codec); in _PyUnicode_Fini()