Default CSV encoding to UTF8 with BOM

issue10769
review362701002
This commit is contained in:
Nicolas Évrard committed 2022-02-03 15:42:29 +01:00
1 parent c3597e9ed7
commit a049e420bd
3 files changed
+3 -3

No files matched your search

+1
View File
@@ -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
+1 -2
View File
@@ -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)
+1 -1
View File
@@ -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: