We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
None
1 parent e62822a commit b089079Copy full SHA for b089079
odo/backends/csv.py
@@ -103,7 +103,7 @@ def open_file(path, *args, **kwargs):
103
f.close()
104
105
106
-def infer_header(path, nbytes=10000, encoding='utf-8', **kwargs):
+def infer_header(path, nbytes=10000, encoding=None, **kwargs):
107
if encoding is None:
108
encoding = 'utf-8'
109
with open_file(path, 'rb') as f:
@@ -123,7 +123,7 @@ def newlines(encoding):
123
return b'\r\n'.decode(encoding), b'\n'.decode(encoding)
124
125
126
-def sniff_dialect(path, nbytes, encoding='utf-8'):
+def sniff_dialect(path, nbytes, encoding=None):
127
if not os.path.exists(path):
128
return {}
129
@@ -183,7 +183,7 @@ class CSV(object):
183
"""
184
canonical_extension = 'csv'
185
186
- def __init__(self, path, has_header=None, encoding='utf-8',
+ def __init__(self, path, has_header=None, encoding=None,
187
sniff_nbytes=10000, buffer=None, **kwargs):
188
self.path = path
189
self._has_header = has_header
0 commit comments