瀏覽代碼

fix: charset

master
dongsuo 4 年之前
父節點
當前提交
02d72bb637
  1. 2
      vislib/views/views.py

2
vislib/views/views.py

@ -35,6 +35,7 @@ def execSql(request):
user=username,
passwd=password,
db=database,
charset='utf8'
)
db.query(sql)
data = db.store_result().fetch_row(maxrows=0, how=2)
@ -49,7 +50,6 @@ def execSql(request):
else:
column = key
if isinstance(row[key], bytes):
print(row[key], key)
json_data[index][column] = row[key].decode('UTF-8', 'ignore')
else:
json_data[index][column] = row[key]

Loading…
取消
儲存