Skip to content

Commit

Permalink
Fix decode issue with multi-byte strings
Browse files Browse the repository at this point in the history
Resolves #11
  • Loading branch information
willtrnr committed Oct 31, 2018
1 parent 54de52d commit cfafe68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyxlsb/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
double_t = struct.Struct('<d')

class RecordReader(object):
def __init__(self, buf, enc='latin-1'):
def __init__(self, buf, enc='utf-16'):
self._fp = io.BytesIO(buf)
self._enc = enc

Expand Down Expand Up @@ -72,7 +72,7 @@ def read_string(self):
buff = self.read(l * 2)
if len(buff) < l * 2:
return None
return buff.decode(self._enc).replace('\x00', '')
return buff.decode(self._enc)


class BIFF12Reader(object):
Expand Down

0 comments on commit cfafe68

Please sign in to comment.