@@ -103,7 +103,7 @@ def open_file(path, *args, **kwargs):
103
103
f .close ()
104
104
105
105
106
- def infer_header (path , nbytes = 10000 , encoding = 'utf-8' , ** kwargs ):
106
+ def infer_header (path , nbytes = 10000 , encoding = None , ** kwargs ):
107
107
if encoding is None :
108
108
encoding = 'utf-8'
109
109
with open_file (path , 'rb' ) as f :
@@ -123,7 +123,7 @@ def newlines(encoding):
123
123
return b'\r \n ' .decode (encoding ), b'\n ' .decode (encoding )
124
124
125
125
126
- def sniff_dialect (path , nbytes , encoding = 'utf-8' ):
126
+ def sniff_dialect (path , nbytes , encoding = None ):
127
127
if not os .path .exists (path ):
128
128
return {}
129
129
if encoding is None :
@@ -183,7 +183,7 @@ class CSV(object):
183
183
"""
184
184
canonical_extension = 'csv'
185
185
186
- def __init__ (self , path , has_header = None , encoding = 'utf-8' ,
186
+ def __init__ (self , path , has_header = None , encoding = None ,
187
187
sniff_nbytes = 10000 , buffer = None , ** kwargs ):
188
188
self .path = path
189
189
self ._has_header = has_header
0 commit comments