Skip to content

Commit 7591b6f

Browse files
committed
Explicitly encode to UTF-8
This is not necessarily the default in Python 2.
1 parent 34dfcd6 commit 7591b6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openslide/lowlevel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def from_param(cls, obj):
106106
if isinstance(obj, cls._bytes_type):
107107
return obj
108108
elif isinstance(obj, cls._str_type):
109-
return obj.encode()
109+
return obj.encode('UTF-8')
110110
else:
111111
raise TypeError('Incorrect type')
112112

0 commit comments

Comments
 (0)