/third_party/python/Lib/encodings/ |
D | utf_32.py | 4 import codecs, sys 8 encode = codecs.utf_32_encode 11 return codecs.utf_32_decode(input, errors, True) 13 class IncrementalEncoder(codecs.IncrementalEncoder): 15 codecs.IncrementalEncoder.__init__(self, errors) 20 result = codecs.utf_32_encode(input, self.errors)[0] 22 self.encoder = codecs.utf_32_le_encode 24 self.encoder = codecs.utf_32_be_encode 29 codecs.IncrementalEncoder.reset(self) 44 self.encoder = codecs.utf_32_le_encode [all …]
|
D | utf_16.py | 9 import codecs, sys 13 encode = codecs.utf_16_encode 16 return codecs.utf_16_decode(input, errors, True) 18 class IncrementalEncoder(codecs.IncrementalEncoder): 20 codecs.IncrementalEncoder.__init__(self, errors) 25 result = codecs.utf_16_encode(input, self.errors)[0] 27 self.encoder = codecs.utf_16_le_encode 29 self.encoder = codecs.utf_16_be_encode 34 codecs.IncrementalEncoder.reset(self) 49 self.encoder = codecs.utf_16_le_encode [all …]
|
D | utf_8_sig.py | 10 import codecs 15 return (codecs.BOM_UTF8 + codecs.utf_8_encode(input, errors)[0], 20 if input[:3] == codecs.BOM_UTF8: 23 (output, consumed) = codecs.utf_8_decode(input, errors, True) 26 class IncrementalEncoder(codecs.IncrementalEncoder): 28 codecs.IncrementalEncoder.__init__(self, errors) 34 return codecs.BOM_UTF8 + \ 35 codecs.utf_8_encode(input, self.errors)[0] 37 return codecs.utf_8_encode(input, self.errors)[0] 40 codecs.IncrementalEncoder.reset(self) [all …]
|
D | ascii.py | 9 import codecs 13 class Codec(codecs.Codec): 17 encode = codecs.ascii_encode 18 decode = codecs.ascii_decode 20 class IncrementalEncoder(codecs.IncrementalEncoder): 22 return codecs.ascii_encode(input, self.errors)[0] 24 class IncrementalDecoder(codecs.IncrementalDecoder): 26 return codecs.ascii_decode(input, self.errors)[0] 28 class StreamWriter(Codec,codecs.StreamWriter): 31 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | latin_1.py | 9 import codecs 13 class Codec(codecs.Codec): 17 encode = codecs.latin_1_encode 18 decode = codecs.latin_1_decode 20 class IncrementalEncoder(codecs.IncrementalEncoder): 22 return codecs.latin_1_encode(input,self.errors)[0] 24 class IncrementalDecoder(codecs.IncrementalDecoder): 26 return codecs.latin_1_decode(input,self.errors)[0] 28 class StreamWriter(Codec,codecs.StreamWriter): 31 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | utf_8.py | 9 import codecs 13 encode = codecs.utf_8_encode 16 return codecs.utf_8_decode(input, errors, True) 18 class IncrementalEncoder(codecs.IncrementalEncoder): 20 return codecs.utf_8_encode(input, self.errors)[0] 22 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 23 _buffer_decode = codecs.utf_8_decode 25 class StreamWriter(codecs.StreamWriter): 26 encode = codecs.utf_8_encode 28 class StreamReader(codecs.StreamReader): [all …]
|
D | utf_16_be.py | 9 import codecs 13 encode = codecs.utf_16_be_encode 16 return codecs.utf_16_be_decode(input, errors, True) 18 class IncrementalEncoder(codecs.IncrementalEncoder): 20 return codecs.utf_16_be_encode(input, self.errors)[0] 22 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 23 _buffer_decode = codecs.utf_16_be_decode 25 class StreamWriter(codecs.StreamWriter): 26 encode = codecs.utf_16_be_encode 28 class StreamReader(codecs.StreamReader): [all …]
|
D | utf_32_le.py | 4 import codecs 8 encode = codecs.utf_32_le_encode 11 return codecs.utf_32_le_decode(input, errors, True) 13 class IncrementalEncoder(codecs.IncrementalEncoder): 15 return codecs.utf_32_le_encode(input, self.errors)[0] 17 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 18 _buffer_decode = codecs.utf_32_le_decode 20 class StreamWriter(codecs.StreamWriter): 21 encode = codecs.utf_32_le_encode 23 class StreamReader(codecs.StreamReader): [all …]
|
D | utf_32_be.py | 4 import codecs 8 encode = codecs.utf_32_be_encode 11 return codecs.utf_32_be_decode(input, errors, True) 13 class IncrementalEncoder(codecs.IncrementalEncoder): 15 return codecs.utf_32_be_encode(input, self.errors)[0] 17 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 18 _buffer_decode = codecs.utf_32_be_decode 20 class StreamWriter(codecs.StreamWriter): 21 encode = codecs.utf_32_be_encode 23 class StreamReader(codecs.StreamReader): [all …]
|
D | utf_16_le.py | 9 import codecs 13 encode = codecs.utf_16_le_encode 16 return codecs.utf_16_le_decode(input, errors, True) 18 class IncrementalEncoder(codecs.IncrementalEncoder): 20 return codecs.utf_16_le_encode(input, self.errors)[0] 22 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 23 _buffer_decode = codecs.utf_16_le_decode 25 class StreamWriter(codecs.StreamWriter): 26 encode = codecs.utf_16_le_encode 28 class StreamReader(codecs.StreamReader): [all …]
|
D | utf_7.py | 5 import codecs 9 encode = codecs.utf_7_encode 12 return codecs.utf_7_decode(input, errors, True) 14 class IncrementalEncoder(codecs.IncrementalEncoder): 16 return codecs.utf_7_encode(input, self.errors)[0] 18 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 19 _buffer_decode = codecs.utf_7_decode 21 class StreamWriter(codecs.StreamWriter): 22 encode = codecs.utf_7_encode 24 class StreamReader(codecs.StreamReader): [all …]
|
D | charmap.py | 13 import codecs 17 class Codec(codecs.Codec): 21 encode = codecs.charmap_encode 22 decode = codecs.charmap_decode 24 class IncrementalEncoder(codecs.IncrementalEncoder): 26 codecs.IncrementalEncoder.__init__(self, errors) 30 return codecs.charmap_encode(input, self.errors, self.mapping)[0] 32 class IncrementalDecoder(codecs.IncrementalDecoder): 34 codecs.IncrementalDecoder.__init__(self, errors) 38 return codecs.charmap_decode(input, self.errors, self.mapping)[0] [all …]
|
D | unicode_escape.py | 9 import codecs 13 class Codec(codecs.Codec): 17 encode = codecs.unicode_escape_encode 18 decode = codecs.unicode_escape_decode 20 class IncrementalEncoder(codecs.IncrementalEncoder): 22 return codecs.unicode_escape_encode(input, self.errors)[0] 24 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 26 return codecs.unicode_escape_decode(input, errors, final) 28 class StreamWriter(Codec,codecs.StreamWriter): 31 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | raw_unicode_escape.py | 9 import codecs 13 class Codec(codecs.Codec): 17 encode = codecs.raw_unicode_escape_encode 18 decode = codecs.raw_unicode_escape_decode 20 class IncrementalEncoder(codecs.IncrementalEncoder): 22 return codecs.raw_unicode_escape_encode(input, self.errors)[0] 24 class IncrementalDecoder(codecs.BufferedIncrementalDecoder): 26 return codecs.raw_unicode_escape_decode(input, errors, final) 28 class StreamWriter(Codec,codecs.StreamWriter): 31 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | iso8859_15.py | 5 import codecs 9 class Codec(codecs.Codec): 12 return codecs.charmap_encode(input,errors,encoding_table) 15 return codecs.charmap_decode(input,errors,decoding_table) 17 class IncrementalEncoder(codecs.IncrementalEncoder): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 21 class IncrementalDecoder(codecs.IncrementalDecoder): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 25 class StreamWriter(Codec,codecs.StreamWriter): 28 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | hp_roman8.py | 12 import codecs 16 class Codec(codecs.Codec): 19 return codecs.charmap_encode(input,errors,encoding_table) 22 return codecs.charmap_decode(input,errors,decoding_table) 24 class IncrementalEncoder(codecs.IncrementalEncoder): 26 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 28 class IncrementalDecoder(codecs.IncrementalDecoder): 30 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 32 class StreamWriter(Codec,codecs.StreamWriter): 35 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | cp1257.py | 5 import codecs 9 class Codec(codecs.Codec): 12 return codecs.charmap_encode(input,errors,encoding_table) 15 return codecs.charmap_decode(input,errors,decoding_table) 17 class IncrementalEncoder(codecs.IncrementalEncoder): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 21 class IncrementalDecoder(codecs.IncrementalDecoder): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 25 class StreamWriter(Codec,codecs.StreamWriter): 28 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | ptcp154.py | 10 import codecs 14 class Codec(codecs.Codec): 17 return codecs.charmap_encode(input,errors,encoding_table) 20 return codecs.charmap_decode(input,errors,decoding_table) 22 class IncrementalEncoder(codecs.IncrementalEncoder): 24 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 26 class IncrementalDecoder(codecs.IncrementalDecoder): 28 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 30 class StreamWriter(Codec,codecs.StreamWriter): 33 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | iso8859_1.py | 5 import codecs 9 class Codec(codecs.Codec): 12 return codecs.charmap_encode(input,errors,encoding_table) 15 return codecs.charmap_decode(input,errors,decoding_table) 17 class IncrementalEncoder(codecs.IncrementalEncoder): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 21 class IncrementalDecoder(codecs.IncrementalDecoder): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 25 class StreamWriter(Codec,codecs.StreamWriter): 28 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | iso8859_13.py | 5 import codecs 9 class Codec(codecs.Codec): 12 return codecs.charmap_encode(input,errors,encoding_table) 15 return codecs.charmap_decode(input,errors,decoding_table) 17 class IncrementalEncoder(codecs.IncrementalEncoder): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 21 class IncrementalDecoder(codecs.IncrementalDecoder): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 25 class StreamWriter(Codec,codecs.StreamWriter): 28 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | iso8859_7.py | 5 import codecs 9 class Codec(codecs.Codec): 12 return codecs.charmap_encode(input,errors,encoding_table) 15 return codecs.charmap_decode(input,errors,decoding_table) 17 class IncrementalEncoder(codecs.IncrementalEncoder): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 21 class IncrementalDecoder(codecs.IncrementalDecoder): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 25 class StreamWriter(Codec,codecs.StreamWriter): 28 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | cp1255.py | 5 import codecs 9 class Codec(codecs.Codec): 12 return codecs.charmap_encode(input,errors,encoding_table) 15 return codecs.charmap_decode(input,errors,decoding_table) 17 class IncrementalEncoder(codecs.IncrementalEncoder): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 21 class IncrementalDecoder(codecs.IncrementalDecoder): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 25 class StreamWriter(Codec,codecs.StreamWriter): 28 class StreamReader(Codec,codecs.StreamReader): [all …]
|
D | iso8859_5.py | 5 import codecs 9 class Codec(codecs.Codec): 12 return codecs.charmap_encode(input,errors,encoding_table) 15 return codecs.charmap_decode(input,errors,decoding_table) 17 class IncrementalEncoder(codecs.IncrementalEncoder): 19 return codecs.charmap_encode(input,self.errors,encoding_table)[0] 21 class IncrementalDecoder(codecs.IncrementalDecoder): 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0] 25 class StreamWriter(Codec,codecs.StreamWriter): 28 class StreamReader(Codec,codecs.StreamReader): [all …]
|
/third_party/python/Lib/test/ |
D | test_codeccallbacks.py | 1 import codecs 98 codecs.register_error( 126 codecs.register_error( 181 codecs.register_error("test.relaxedutf8", relaxedutf8) 201 self.assertEqual(codecs.charmap_encode(sin, "strict", charmap)[0], sout) 204 self.assertRaises(UnicodeError, codecs.charmap_encode, sin, "strict", charmap) 209 self.assertEqual(codecs.charmap_encode(sin, "replace", charmap)[0], sout) 212 self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap) 225 codecs.register_error("test.handler1", handler1) 233 codecs.register_error("test.handler2", handler2) [all …]
|
D | test_codecs.py | 1 import codecs 77 d = codecs.getincrementaldecoder(encoding)() 92 d = codecs.getincrementaldecoder(encoding)() 99 d = codecs.getincrementalencoder(encoding)() 102 d = codecs.getincrementalencoder(encoding)() 115 r = codecs.getreader(self.encoding)(q) 126 d = codecs.getincrementaldecoder(self.encoding)() 149 "".join(codecs.iterdecode([bytes([c]) for c in encoded], self.encoding)) 155 return codecs.getreader(self.encoding)(stream) 219 return codecs.getreader(self.encoding)(stream) [all …]
|