Lines Matching defs:encoding

11 "Search functions are expected to take one argument, the encoding name in\n"
30 "lookup($module, encoding, /)\n"
39 _codecs_lookup_impl(PyObject *module, const char *encoding);
45 const char *encoding;
52 encoding = PyUnicode_AsUTF8AndSize(arg, &encoding_length);
53 if (encoding == NULL) {
56 if (strlen(encoding) != (size_t)encoding_length) {
60 return_value = _codecs_lookup_impl(module, encoding);
67 "encode($module, /, obj, encoding=\'utf-8\', errors=\'strict\')\n"
70 "Encodes obj using the codec registered for encoding.\n"
72 "The default encoding is \'utf-8\'. errors may be given to set a\n"
73 "different error handling scheme. Default is \'strict\' meaning that encoding\n"
82 _codecs_encode_impl(PyObject *module, PyObject *obj, const char *encoding,
89 static const char * const _keywords[] = {"obj", "encoding", "errors", NULL};
94 const char *encoding = NULL;
107 _PyArg_BadArgument("encode", "argument 'encoding'", "str", args[1]);
111 encoding = PyUnicode_AsUTF8AndSize(args[1], &encoding_length);
112 if (encoding == NULL) {
115 if (strlen(encoding) != (size_t)encoding_length) {
137 return_value = _codecs_encode_impl(module, obj, encoding, errors);
144 "decode($module, /, obj, encoding=\'utf-8\', errors=\'strict\')\n"
147 "Decodes obj using the codec registered for encoding.\n"
149 "Default encoding is \'utf-8\'. errors may be given to set a\n"
150 "different error handling scheme. Default is \'strict\' meaning that encoding\n"
159 _codecs_decode_impl(PyObject *module, PyObject *obj, const char *encoding,
166 static const char * const _keywords[] = {"obj", "encoding", "errors", NULL};
171 const char *encoding = NULL;
184 _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[1]);
188 encoding = PyUnicode_AsUTF8AndSize(args[1], &encoding_length);
189 if (encoding == NULL) {
192 if (strlen(encoding) != (size_t)encoding_length) {
214 return_value = _codecs_decode_impl(module, obj, encoding, errors);
2717 "instance containing information about the location of the encoding/decoding\n"