mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 01:46: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,
|
||||
# no matter how site.py is set...
|
||||
reload(sys)
|
||||
loc = locale.getdefaultlocale()[1]
|
||||
loc = locale.getpreferredencoding()
|
||||
if not loc:
|
||||
loc = sys.getdefaultencoding()
|
||||
loc = sys.getpreferredencoding()
|
||||
sys.setdefaultencoding(loc)
|
||||
del sys.setdefaultencoding
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user