Skip to content

Commit

Permalink
BUG: Fix handling of encoding for the StataReader pandas-dev#21244
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Castravete committed May 30, 2018
1 parent 3147a86 commit adb0918
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/io/stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ def _calcsize(self, fmt):

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

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

0 comments on commit adb0918

Please sign in to comment.