greenew / pypyodbc

Automatically exported from code.google.com/p/pypyodbc
0 stars 0 forks source link

cursor.fetchone raise ValueError Exception on linux unixodc #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

pypyodbc read the mdb file on windows is perfect,but on debian linux use 
unixODBC, the same script,the same mdb file, pypyodbc crashed.

the output list below:

Traceback (most recent call last):
  File "extract_building.py", line 161, in <module>
    extract_building('Record.mdb')
  File "extract_building.py", line 26, in extract_building
    row = cur.fetchone()
  File "/usr/local/lib/python3.3/dist-packages/pypyodbc.py", line 1842, in fetchone
    value_list.append(buf_cvt_func(alloc_buffer.value))
ValueError: invalid literal for int() with base 10: b'\xe0'

try pyodbc to read the mdb file,pyodbc did not crash,but the result is all mess.

the mdb database has chinese character encoded by GB charset, the problem maybe 
due to charset convert. 
i use the latest pypyodbc 1.2.1 on debian testing,also on windows 8.1

the script and mdb file attached.

best regards

Original issue reported on code.google.com by changuoq...@gmail.com on 23 Nov 2013 at 12:41

Attachments: