
fix issue encountered when importing from a UTF-8 encoded filesystem with non-breaking spaces.
8 lines
132 B
Python
8 lines
132 B
Python
def _decode(string, encoding='utf8'):
|
|
if hasattr(string, 'decode'):
|
|
return string.decode(encoding)
|
|
|
|
return string
|
|
|
|
|