mirror of
https://github.com/robweber/xbmcbackup.git
synced 2025-06-23 11:04:31 +02:00
attempted fix for unicode errors on logging
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user