mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 15:37:17 +02:00
Fix a bug in to_str() that caused it to not actually try alternative encodings when converting.
This commit is contained in:
parent
8b6891428f
commit
9da1051f83
1 changed files with 1 additions and 1 deletions
|
|
@ -636,7 +636,7 @@ def to_str(obj, encoding='utf-8', force_string=False):
|
|||
except UnicodeEncodeError:
|
||||
for alt_encoding in ENCODINGS:
|
||||
try:
|
||||
obj = obj.encode(encoding)
|
||||
obj = obj.encode(alt_encoding)
|
||||
return obj
|
||||
except UnicodeEncodeError:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue