Commits

Anonymous committed 0ff3abc

Set locale in test_doc.py

Comments (0)

Files changed (1)

hachoir-core/test_doc.py

 import os
 import re
 from stat import S_ISREG, ST_MODE
+import hachoir_core.i18n   # import it because it does change the locale
+from locale import setlocale, LC_ALL
 
 regex_doc_filename = re.compile("^[a-z0-9_-]+\.txt$")
 
     print "--- End of test"
 
 def main():
+    setlocale(LC_ALL, "C")
     hachoir_dir = os.path.dirname(__file__)
     sys.path.append(hachoir_dir)