Hi Pierre-Henri
You see an inconsistency between 'python2.7' and 'spyder python2.7' behaviour.
'\xe9' is the code of "é" in 'latin1'.
'\xc3\xa9' is the code of "é" in unicode 'utf-8'
Try this , so we can see if you have indeed a 'latin1' or 'cp1252' showing up somewhere in your config.
>>>import locale;import sys;print(locale.getdefaultlocale(),locale.getpreferredencoding(),sys.getdefaultencoding())
Le jeudi 5 septembre 2013 14:40:02 UTC+2, Pierre-Henri a écrit :Hi,My computer is running osx 10.8.4, localized in french (LANG = fr_FR.UTF-8)In a python (2.7) console (not within spyder) launched in a terminal, I get>>> s = 'é' ; s; len(s)'\xc3\xa9'2>>> s = u'é'; s; len(s)u'\xe9'1I get the same result within an iPython console, within spyder.But, within spyder, in a python console, I do get this instead :>>> s = 'é' ; s; len(s)'\xc3\xa9'2>>> s = u'é'; s; len(s)'\xc3\xa9'2I suspected the LANG environment variable was the reason, as within spyder (2.2.1 DMG), from the output of os.environ, I get en_US for LANG instead, but when I run from the terminal a port installed 2.2.2 spyder, in which os.environ shows fr_FR.UTF-8 for the LANG env variable, I get the same strange (for me) result than the last one quoted above, so that is not the explanation.So what could be the explanation for this difference ?Thanks,Pierre-Henri
--
You received this message because you are subscribed to a topic in the Google Groups "spyder" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spyderlib/v5ELu04_DXU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/groups/opt_out.
...:
é
2
é
1
In [2]
*** end of experiment ********