module utils: update code to python3 (#10907)

* module utils: update code to python3

* add changelog frag
This commit is contained in:
Alexei Znamensky
2025-10-12 00:42:11 +13:00
committed by GitHub
parent ce544f370c
commit cc83188594
9 changed files with 83 additions and 77 deletions

View File

@@ -52,7 +52,7 @@ def initialize_dialect(dialect, **kwargs):
def read_csv(data, dialect, fieldnames=None):
BOM = to_native(u'\ufeff')
BOM = to_native('\ufeff')
data = to_native(data, errors='surrogate_or_strict')
if data.startswith(BOM):
data = data[len(BOM):]