Skip to content

Commit

Permalink
Explicitly encode to UTF-8
Browse files Browse the repository at this point in the history
This is not necessarily the default in Python 2.
  • Loading branch information
bgilbert committed Jan 27, 2014
1 parent 34dfcd6 commit 7591b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openslide/lowlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def from_param(cls, obj):
if isinstance(obj, cls._bytes_type):
return obj
elif isinstance(obj, cls._str_type):
return obj.encode()
return obj.encode('UTF-8')
else:
raise TypeError('Incorrect type')

Expand Down

0 comments on commit 7591b6f

Please sign in to comment.