Fix Export View to CSV when Unicode characters are present

Fixes #10404
This commit is contained in:
prculley 2018-02-05 11:41:12 -06:00 committed by Nick Hall
parent 1bf9fef1cb
commit 54ab2820c3

View File

@ -31,6 +31,7 @@ import csv
#
#-------------------------------------------------------------------------
from .tabbeddoc import *
from ...constfunc import win
class CSVTab(TabbedDoc):
@ -48,7 +49,8 @@ class CSVTab(TabbedDoc):
else:
self.filename = filename
self.f = open(self.filename, "w")
self.f = open(self.filename, "w",
encoding='utf_8_sig' if win() else 'utf_8')
self.writer = csv.writer(self.f)
def close(self):