• Home
  • Raw
  • Download

Lines Matching refs:encoder

70         encoder = codecs.getincrementalencoder('cp949')()
71 self.assertEqual(encoder.encode(u'\ud30c\uc774\uc36c \ub9c8\uc744'),
73 self.assertEqual(encoder.reset(), None)
74 self.assertEqual(encoder.encode(u'\u2606\u223c\u2606', True),
76 self.assertEqual(encoder.reset(), None)
77 self.assertEqual(encoder.encode(u'', True), '')
78 self.assertEqual(encoder.encode(u'', False), '')
79 self.assertEqual(encoder.reset(), None)
87 encoder = codecs.getincrementalencoder('jisx0213')()
88 self.assertEqual(encoder.encode(u'\u00e6\u0300'), '\xab\xc4')
89 self.assertEqual(encoder.encode(u'\u00e6'), '')
90 self.assertEqual(encoder.encode(u'\u0300'), '\xab\xc4')
91 self.assertEqual(encoder.encode(u'\u00e6', True), '\xa9\xdc')
93 self.assertEqual(encoder.reset(), None)
94 self.assertEqual(encoder.encode(u'\u0300'), '\xab\xdc')
96 self.assertEqual(encoder.encode(u'\u00e6'), '')
97 self.assertEqual(encoder.encode('', True), '\xa9\xdc')
98 self.assertEqual(encoder.encode('', True), '')
101 encoder = codecs.getincrementalencoder('jisx0213')()
102 self.assertEqual(encoder.encode(u'\u00e6'), '')
103 self.assertRaises(UnicodeEncodeError, encoder.encode, u'\u0123')
104 self.assertEqual(encoder.encode(u'\u0300\u00e6'), '\xab\xc4')
105 self.assertRaises(UnicodeEncodeError, encoder.encode, u'\u0123')
106 self.assertEqual(encoder.reset(), None)
107 self.assertEqual(encoder.encode(u'\u0300'), '\xab\xdc')
108 self.assertEqual(encoder.encode(u'\u00e6'), '')
109 self.assertRaises(UnicodeEncodeError, encoder.encode, u'\u0123')
110 self.assertEqual(encoder.encode(u'', True), '\xa9\xdc')
113 encoder = codecs.getincrementalencoder('shift-jis')('backslashreplace')
114 self.assertEqual(encoder.encode(u'\xff'), b'\\xff')
115 self.assertEqual(encoder.encode(u'\n'), b'\n')
253 encoder = codecs.getincrementalencoder(self.encoding)()
255 encoder.encode(char)
260 encoder = codecs.getincrementalencoder(self.encoding)()
263 encoder.encode(char, index == last_index)