Download button not using "utf-8" for decoding Chinese character

When use download button with " mime = ‘text/plain’ ", seems it use “gbk” to decode Chinese character from file object. So I must do “df.to_csv().encode(‘gbk’)” instead of “df.to_csv().encode(‘utf-8’)” to get correct output csv file. It will be better to always use “utf-8” for encoding and decoding.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.