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
I think u'J\xe2nis'
is correct, see:
>>> print u'J\xe2nis'.encode('utf-8')
Jânis
Are you getting actual errors from SQLAlchemy or in your application's output?