Convert using utf-8 instead of ascii in safe_str()

This way we don't lose information and the returned string is
ascii-compatible anyway
This commit is contained in:
Bruno Oliveira 2017-03-29 15:18:41 -03:00
parent 58ac4faf0c
commit a542ed48a2
1 changed files with 1 additions and 1 deletions

View File

@ -240,4 +240,4 @@ else:
if not isinstance(v, unicode):
v = unicode(v)
errors = 'replace'
return v.encode('ascii', errors)
return v.encode('utf-8', errors)