Merge pull request #710 from khertan/patch-1
#708 : Use default locale encoding
This commit is contained in:
commit
7c5b116a95
|
@ -18,7 +18,7 @@ language = DEFAULT_LANGUAGE
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import locale
|
import locale
|
||||||
encoding = locale.getpreferredencoding(False) or DEFAULT_ENCODING
|
encoding = locale.getpreferredencoding(True) or DEFAULT_ENCODING
|
||||||
language = locale.getlocale()[0] or locale.getdefaultlocale()[0] or DEFAULT_LANGUAGE
|
language = locale.getlocale()[0] or locale.getdefaultlocale()[0] or DEFAULT_LANGUAGE
|
||||||
except:
|
except:
|
||||||
logger.exception('Could not determine language or encoding')
|
logger.exception('Could not determine language or encoding')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user