The current 1.3.3 version of PYPYODBC on the Linux system has been able to read the MDB file with Chinese characters, no exception, but read the Chinese characters are all garbled.
The following are reasonable inferences based on a number of phenomena:
MDB files from the Windows system, where the Chinese characters using GB encoding is no doubt, but Linux system on the Mdbtools provided by the ODBC driver layer has been encoded conversion, the GB code into Unicode code, PYPYODBC again to convert so there is a problem.
The Pypyodbc.connect function has a parameter unicode_results, which defaults to true on the Python3 version, which returns a Unicode-encoded result set.
ODBC low-level drive conversion once encoded, PYPYODBC again, the tragedy inevitably appeared.
So the unicode_results of the Connect function is false, which means that the result set is returned as is, and then the field name and field values in the result set need to be decoded to a Unicode string:
$ python3
>>> conn=pypyodbc.connect (' Driver=mdbtools;dbq=/path/to/record.mdb ', unicode_results=false)
>>> conn.cursor (). Execute (' SELECT * from Build '). Fetchone () [0].decode (' UTF-8 ')
The decode (' utf-8′) decoding was successful, indicating that the result set returned by the ODBC driver for Mdbtools is already a Unicode encoded format.