From: dpt Date: Wed, 1 Feb 2017 11:00:06 +0000 (+0100) Subject: Pour corriger le souci d'unicode sur Windows. X-Git-Tag: 5.0.0a1~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=96647c2d60d21e071cda4521305c313f81d6bb26;p=tools%2Fsat.git Pour corriger le souci d'unicode sur Windows. --- diff --git a/src/pyconf.py b/src/pyconf.py index 1eaea9f..713e3fe 100644 --- a/src/pyconf.py +++ b/src/pyconf.py @@ -1223,6 +1223,10 @@ class ConfigReader(object): else: self.lastc = None self.last_token = tt + + # Python 2.x specific unicode conversion + if sys.version_info[0] == 2 and tt == WORD and isinstance(token, unicode): + token = token.encode('ascii') return (tt, token) def load(self, stream, parent=None, suffix=None):