Lines Matching defs:enc
78 tok->enc = NULL;
437 fp_setreadl(struct tok_state *tok, const char* enc)
461 fd, "r", -1, enc, Py_None, Py_None, Py_False);
602 buf_setreadl(struct tok_state *tok, const char* enc) {
603 tok->enc = enc;
611 translate_into_utf8(const char* str, const char* enc) {
613 PyObject* buf = PyUnicode_Decode(str, strlen(str), enc, NULL);
683 tok->enc = NULL;
689 if (tok->enc != NULL) {
690 utf8 = translate_into_utf8(str, tok->enc);
704 tok->enc = NULL;
711 if (tok->enc == NULL && tok->decoding_state != STATE_NORMAL && newl[1]) {
717 if (tok->enc != NULL) {
719 utf8 = translate_into_utf8(str, tok->enc);
765 tok->enc = NULL;
781 _PyTokenizer_FromFile(FILE *fp, const char* enc,
796 if (enc != NULL) {
799 tok->encoding = new_string(enc, strlen(enc), tok);