Lines Matching refs:decode
31 self.assertEqual(''.decode(enc), u'')
122 self.assertEqual(decoder.decode('\xc6\xc4\xc0\xcc\xbd'),
124 self.assertEqual(decoder.decode('\xe3 \xb8\xb6\xc0\xbb'),
126 self.assertEqual(decoder.decode(''), u'')
130 self.assertEqual(decoder.decode('\xc6\xc4\xc0'), u'\ud30c')
131 self.assertRaises(UnicodeDecodeError, decoder.decode, '', True)
132 self.assertEqual(decoder.decode('\xcc'), u'\uc774')
134 self.assertEqual(decoder.decode('\xc6\xc4\xc0'), u'\ud30c')
135 self.assertRaises(UnicodeDecodeError, decoder.decode, '\xcc\xbd', True)
136 self.assertEqual(decoder.decode('\xcc'), u'\uc774')
141 self.assertEqual(decoder.decode(ESC + '('), u'')
142 self.assertEqual(decoder.decode('B', True), u'')
143 self.assertEqual(decoder.decode(ESC + '$'), u'')
144 self.assertEqual(decoder.decode('B@$'), u'\u4e16')
145 self.assertEqual(decoder.decode('@$@'), u'\u4e16')
146 self.assertEqual(decoder.decode('$', True), u'\u4e16')
148 self.assertEqual(decoder.decode('@$'), u'@$')
149 self.assertEqual(decoder.decode(ESC + '$'), u'')
150 self.assertRaises(UnicodeDecodeError, decoder.decode, '', True)
151 self.assertEqual(decoder.decode('B@$'), u'\u4e16')
225 self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni)