Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
a94c5b04
Commit
a94c5b04
authored
Oct 26, 2017
by
Wolfgang Rohdewald
Browse files
kajonggtest: make sure we have a UTF-8 default encoding
parent
7be419e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kajonggtest.py
View file @
a94c5b04
...
...
@@ -31,6 +31,7 @@ import time
import
gc
from
optparse
import
OptionParser
from
locale
import
getdefaultlocale
from
common
import
Debug
,
StrMixin
,
cacheDir
from
util
import
removeIfExists
,
gitHead
,
checkMemory
...
...
@@ -721,6 +722,11 @@ def main():
"""parse options, play, evaluate results"""
global
OPTIONS
# pylint: disable=global-statement
locale_encoding
=
getdefaultlocale
()[
1
]
if
locale_encoding
!=
'UTF-8'
:
print
(
'we need default encoding UTF-8 but have {}'
.
format
(
locale_encoding
))
sys
.
exit
(
2
)
# we want only english in the logs because i18n and friends
# behave differently in kde and kde
os
.
environ
[
'LANG'
]
=
'en_US.UTF-8'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment