diff --git a/gramps/gen/utils/docgen/csvtab.py b/gramps/gen/utils/docgen/csvtab.py index a9d6bfe51..01822ebf4 100644 --- a/gramps/gen/utils/docgen/csvtab.py +++ b/gramps/gen/utils/docgen/csvtab.py @@ -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):