Commit 05a65110 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Try and find a utf8 locale to use

In other locales we get some test failures for some ghci unicode tests
parent 7e39a735
......@@ -22,6 +22,22 @@ from testglobals import *
# value.
os.environ['TERM'] = 'vt100'
# Try and find a utf8 locale to use
# First see if 'locale -a' works
h = os.popen('locale -a', 'r')
v = h.read()
h.close()
if v != '':
# If it does then use the first utf8 locale that is available
h = os.popen('locale -a | grep -i utf8 | head', 'r')
v = h.read()
h.close()
if v != '':
os.environ['LC_ALL'] = v
else:
print 'WARNING: No UTF8 locale found.'
print 'You may get some spurious test failures.'
global config
config = getConfig() # get it from testglobals
......
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