diff --git a/gestion/affich_tools.py b/gestion/affich_tools.py index 78462980..953e098f 100755 --- a/gestion/affich_tools.py +++ b/gestion/affich_tools.py @@ -10,8 +10,11 @@ Licence : GPLv2 import sys, sre, os, tempfile # Détermination de l'encodage -from locale import getpreferredencoding -encoding = getpreferredencoding() +try: + from locale import getpreferredencoding + encoding = getpreferredencoding() +except: + encoding = "ISO-8859-15" if 'TERM' in os.environ and os.environ['TERM'] != 'unknown': el = os.popen('tput cr ; tput el').read()