Correctly reading text from Windows-1252(cp1252) file in python
CP1252 cannot represent ā; your input contains the similar character â. repr just displays an ASCII representation of a unicode string in Python 2.x: >>> print(repr(b’J\xe2nis’.decode(‘cp1252′))) u’J\xe2nis’ >>> print(b’J\xe2nis’.decode(‘cp1252’)) Jânis