Python's string.translate() doesn't fully work?
- by Rhubarb
Given this example, I get the error that follows:
print u'\2033'.translate({2033:u'd'})
C:\Python26\lib\encodings\cp437.pyc in encode(self, input, errors)
10
11 def encode(self,input,errors='strict'):
---> 12 return codecs.charmap_encode(input,errors,encoding_map)
13
14 def decode(self,input,errors='strict'):
UnicodeEncodeError: 'charmap' codec can't encode character u'\x83' in position 0