Lines Matching refs:charmap
205 charmap = dict([ (ord(c), 2*c.upper()) for c in "abcdefgh"])
208 self.assertEqual(codecs.charmap_encode(sin, "strict", charmap)[0], sout)
211 self.assertRaises(UnicodeError, codecs.charmap_encode, sin, "strict", charmap)
213 charmap[ord("?")] = "XYZ"
216 self.assertEqual(codecs.charmap_encode(sin, "replace", charmap)[0], sout)
218 charmap[ord("?")] = u"XYZ"
219 self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap)
221 charmap[ord("?")] = u"XYZ"
222 self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap)
828 charmap = {
837 text.translate(charmap)