File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1818import os
1919import glob
2020import shutil
21+ import locale
2122
2223#import CLAM-specific modules. The CLAM API makes a lot of stuff easily accessible.
2324import clam .common .data
4647 run_piccl = "nextflow run LanguageMachines/PICCL/"
4748 print ("Running PICCL mediated by Nextflow" ,file = sys .stderr )
4849
49- print ("System default encoding: " , sys .getdefaultencoding (), file = sys .stderr )
5050
51+ print ("System default encoding: " , sys .getdefaultencoding (), file = sys .stderr )
52+ print ("Forcing en_US.UTF-8 locale..." , file = sys .stderr )
53+ locale .setlocale (locale .LC_ALL , 'en_US.UTF-8' )
5154
5255#If you make use of CUSTOM_FORMATS, you need to import your service configuration file here and set clam.common.data.CUSTOM_FORMATS
5356#Moreover, you can import any other settings from your service configuration file as well:
5861clamdata = clam .common .data .getclamdata (datafile )
5962
6063if 'debug' in clamdata and clamdata ['debug' ]:
61- print ("Locale information: " , file = sys .stderr )
64+ print ("Locale information (will force en_US.UTF-8) : " , file = sys .stderr )
6265 os .system ("locale >&2" , file = sys .stderr )
6366
6467#You now have access to all data. A few properties at your disposition now are:
You can’t perform that action at this time.
0 commit comments