Home | History | Annotate | Download | only in encodings

Lines Matching refs:input

14 def encode(input, errors='strict'):
15 return (codecs.BOM_UTF8 + codecs.utf_8_encode(input, errors)[0], len(input))
17 def decode(input, errors='strict'):
19 if input[:3] == codecs.BOM_UTF8:
20 input = input[3:]
22 (output, consumed) = codecs.utf_8_decode(input, errors, True)
30 def encode(self, input, final=False):
33 return codecs.BOM_UTF8 + codecs.utf_8_encode(input, self.errors)[0]
35 return codecs.utf_8_encode(input, self.errors)[0]
52 def _buffer_decode(self, input, errors, final):
54 if len(input) < 3:
55 if codecs.BOM_UTF8.startswith(input):
63 if input[:3] == codecs.BOM_UTF8:
64 (output, consumed) = codecs.utf_8_decode(input[3:], errors, final)
66 return codecs.utf_8_decode(input, errors, final)
80 def encode(self, input, errors='strict'):
82 return encode(input, errors)
92 def decode(self, input, errors='strict'):
93 if len(input) < 3:
94 if codecs.BOM_UTF8.startswith(input):
98 elif input[:3] == codecs.BOM_UTF8:
100 (output, consumed) = codecs.utf_8_decode(input[3:],errors)
104 return codecs.utf_8_decode(input, errors)