Skip to content

Commit adb0918

Browse files
author
Adrian Castravete
committed
BUG: Fix handling of encoding for the StataReader pandas-dev#21244
1 parent 3147a86 commit adb0918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/stata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ def _calcsize(self, fmt):
13351335

13361336
def _decode(self, s):
13371337
s = s.partition(b"\0")[0]
1338-
return s.decode('utf-8')
1338+
return s.decode(self._encoding or self._default_encoding)
13391339

13401340
def _null_terminate(self, s):
13411341
if compat.PY3 or self._encoding is not None:

0 commit comments

Comments
 (0)