attempted fix for unicode errors on logging

This commit is contained in:
Rob Weber
2014-01-23 12:47:21 -06:00
parent 884633073a
commit e185ddf131
2 changed files with 10 additions and 1 deletions

View File

@ -29,4 +29,11 @@ def getString(string_id):
return __Addon.getLocalizedString(string_id)
def encode(string):
return string.encode('UTF-8','replace')
result = ''
try:
result = string.encode('UTF-8','replace')
except UnicodeDecodeError:
result = 'Unicode Error'
return result