mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Merge pull request #117 from Prinz23/SYS_ENCODING_fix2
Fix SYS_ENCODING - Set System Default if UTF-8 fails
This commit is contained in:
commit
6bba04489a
1 changed files with 4 additions and 2 deletions
|
@ -127,8 +127,10 @@ class SickRage(object):
|
||||||
sickbeard.SYS_ENCODING = None
|
sickbeard.SYS_ENCODING = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, "UTF-8")
|
locale.setlocale(locale.LC_ALL, "")
|
||||||
locale.setlocale(locale.LC_CTYPE, "UTF-8")
|
except (locale.Error, IOError):
|
||||||
|
pass
|
||||||
|
try:
|
||||||
sickbeard.SYS_ENCODING = locale.getpreferredencoding()
|
sickbeard.SYS_ENCODING = locale.getpreferredencoding()
|
||||||
except (locale.Error, IOError):
|
except (locale.Error, IOError):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue