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:
commit
3a2317889c
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user