1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 18:06:13 +01:00

Merge pull request #8 from nijel/master

Better detection of user charset
This commit is contained in:
Marcus Hüwe 2012-08-07 02:57:28 -07:00
commit 3a2317889c

View File

@ -11,9 +11,9 @@ from osc import commandline, babysitter
# this is a hack to make osc work as expected with utf-8 characters, # this is a hack to make osc work as expected with utf-8 characters,
# no matter how site.py is set... # no matter how site.py is set...
reload(sys) reload(sys)
loc = locale.getdefaultlocale()[1] loc = locale.getpreferredencoding()
if not loc: if not loc:
loc = sys.getdefaultencoding() loc = sys.getpreferredencoding()
sys.setdefaultencoding(loc) sys.setdefaultencoding(loc)
del sys.setdefaultencoding del sys.setdefaultencoding