Skip to content

Commit 12c77b4

Browse files
committed
Fixing the issue of garbled characters (Chinese characters) when opening the CSV export in Microsoft Excel.
1 parent fa4a881 commit 12c77b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ihatemoney/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def list_of_dicts2csv(dict_to_convert):
196196
writer = csv.writer(csv_file)
197197
writer.writerows(csv_data)
198198
csv_file.seek(0)
199-
csv_file = BytesIO(csv_file.getvalue().encode("utf-8"))
199+
csv_file = BytesIO(csv_file.getvalue().encode("utf-8-sig"))
200200
return csv_file
201201

202202

0 commit comments

Comments
 (0)