[問題] Google表單 gspread的encode

看板Python作者 (R5大小姐-EX人品崩壞)時間6年前 (2017/11/08 19:43), 6年前編輯推噓1(102)
留言3則, 2人參與, 6年前最新討論串1/1
大家好 最近在寫一個從google雲端硬碟讀取google試算表的小程式 利用oauth2client + gspread 做的 其中讀取表單的部分為 def read_sheet(gss_client, key): wks = gss_client.open_by_key(key) sheet = wks.sheet1 data = sheet.get_all_records() return data return的data 為 list 裡面放 dict 每一個KEY都是每一行的項目 VALUE則是項目值 => [{"time" : "2017/11/8 下午 3:21:14", "value":"test"}, {"time" : "2017/11/8 下午 3:24:18", "value":"測試"} ] 不過現在遇到一個問題是 似乎回傳回來的內容 只要有中文 就會變成亂碼 https://i.imgur.com/jItq606.png
請問這有沒有解法QQ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 163.18.49.42 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1510141397.A.5CB.html

11/08 20:15, 6年前 , 1F
哪個平台windows? linux?
11/08 20:15, 1F

11/08 21:05, 6年前 , 2F
windows 使用python 3.6
11/08 21:05, 2F

11/09 01:03, 6年前 , 3F
console編碼改看看
11/09 01:03, 3F
我發現好像是我的Visual Code的問題= = ※ 編輯: neil987 (219.68.18.225), 11/09/2017 06:54:23
文章代碼(AID): #1Q0ktLNB (Python)