I've been struggling for a day with this one: I have a program that basically connects to two data sources (one ODBC with pyodbc, the other one to MariaDB with mysqlclient) and transfers data from one to the other.
When the pyodbc connection fails, an error message appears, such as this one:
pyodbc.InterfaceError: ('28000', '[28000] [FileMaker][FileMaker] (212): Invalid account/password\x00\u75c0*\u75c0*\u33e4*\x1f\x00\u6029\u4ed6\uf278\u011e\u65aa\u669b\u4ae0+\u75c0*\u6029\u4ed6\uf270\u011e\x00\x00\x00\x00\u36a8\x1b\x00\x00\x01\x00\x1f\x00\x01\x00\uf28c\u011e\uf290\u011e\u351a\u669e\x06\x00\ub0201\uf2b8\u011e\ua975\u66a0\x00\x00\x1f\x00 (212) (SQLDriverConnect); [28000] [FileMaker][FileMaker] (212): Invalid account/password\x00\u75c0*\u75c0*\u33e4*\x1f\x00\u6029\u4ed6\uf278\u011e\u65aa\u669b\u4ae0+\u75c0*\u6029\u4ed6\uf270\u011e\x00\x00\x00\x00\u36a8\x1b\x00\x00\x01\x00\x1f\x00\x01\x00\uf28c\u011e\uf290\u011e\u351a\u669e\x06\x00\ub0201\uf2b8\u011e\ua975\u66a0\x00\x00\x1f\x00 (212)')
As you see, it contains lots of what seems to be UTF16 (LE ??) characters. I tried tons of ways to make this string readable, even just cutting it at the first \x00
, none of them worked properly. Does anyone know how to make it readable?
Also: this problem only happens on windows. The same script runs perfectly on a mac.