You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code fail in IPython (last stable version) :
In [1]: f = open(u'/home/thomas/Expérimentations/test.dat')
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
/home/thomas/ in ()
IOError: [Errno 2] No such file or directory: u'/home/thomas/Exp\xc3\xa9rimentations/test.dat'
On the standard python interpreter, this work flawlessly. A filepath without unicode character work in both.
The text was updated successfully, but these errors were encountered:
Thanks for the report. We do have a set of serious unicode problems, thanks for reporting this variant as it will help ensuring we make this a specific test. I hope to tackle the whole unicde mess very soon.
What is your default encoding/version? (sys.getdefaultencoding()) And also what is the encoding in your Terminal window?
The normal default with 2.x is ascii, in which case you actually can't do:
u'é' in a Terminal, as far as I know (I get a UnicodeError just typing that)
Note that if you have sys.setdefaultencoding='utf8', then you can type that, but weird things can happen, as I recently learned from Robert Kern.
With utf8 as default encoding, I was able to perform the example you mention:
In [21]: f = open(u"Expérimentations/test.dat")
In [22]: print f.read()
asdf
The bug could be that I think 'Exp\xc3\xa9rimentations' should actually be 'Exp\xa9rimentations'.
Unicode seriously confuses me, so good luck to Fernando working on this.
The following code fail in IPython (last stable version) :
On the standard python interpreter, this work flawlessly. A filepath without unicode character work in both.
The text was updated successfully, but these errors were encountered: