diff --git a/CHANGELOG b/CHANGELOG index 665861bdca..9b86301c0d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Default CSV encoding to UTF8 with BOM * Display the number of selected records * Humanize the count result * Add limit to search_count diff --git a/tryton/gui/window/win_csv.py b/tryton/gui/window/win_csv.py index f28d64dcd6..53517517b7 100644 --- a/tryton/gui/window/win_csv.py +++ b/tryton/gui/window/win_csv.py @@ -161,8 +161,7 @@ class WinCSV(NoModal): self.csv_enc = Gtk.ComboBoxText() for i, encoding in enumerate(encodings): self.csv_enc.append_text(encoding) - if ((os.name == 'nt' and encoding == 'cp1252') - or (os.name != 'nt' and encoding == 'utf_8')): + if encoding == 'utf_8_sig': self.csv_enc.set_active(i) label_csv_enc.set_mnemonic_widget(self.csv_enc) box.pack_start(self.csv_enc, expand=False, fill=True, padding=0) diff --git a/tryton/gui/window/win_export.py b/tryton/gui/window/win_export.py index 23476002ac..8750b9543b 100644 --- a/tryton/gui/window/win_export.py +++ b/tryton/gui/window/win_export.py @@ -383,7 +383,7 @@ class WinExport(WinCSV): self.destroy() def export_csv(self, fname, fields, data, paths, popup=True): - encoding = self.csv_enc.get_active_text() or 'UTF-8' + encoding = self.csv_enc.get_active_text() or 'utf_8_sig' locale_format = self.csv_locale.get_active() try: