Commit a94c5b04 authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

kajonggtest: make sure we have a UTF-8 default encoding

parent 7be419e5
......@@ -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'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment