From 75f289375305d04f66fb77ec97444985e4cd8fe0 Mon Sep 17 00:00:00 2001 From: bernat Date: Sat, 26 Nov 2005 14:27:10 +0100 Subject: [PATCH] Ca foire dans les scripts d'impression, ce truc darcs-hash:20051126132710-d1718-2a34c47dc864bcd75083c5dc638595e96ccb726e.gz --- gestion/affich_tools.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()