Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100422
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2015-12-14 11:07 -0800 |
| References | <n4mqgm$v1d$1@news2.informatik.uni-stuttgart.de> <mailman.12.1450118127.14916.python-list@python.org> |
| Message-ID | <f5a442d3-a17e-4f67-b866-5d77605c4462@googlegroups.com> (permalink) |
| Subject | Re: cannot open file with non-ASCII filename |
| From | wxjmfauth@gmail.com |
Le lundi 14 décembre 2015 19:35:49 UTC+1, Terry Reedy a écrit : > On 12/14/2015 11:24 AM, Ulli Horlacher wrote: > > With Python 2.7.11 on Windows 7 my users cannot open/read files with > > non-ASCII filenames. > > Right. They should either restrict themselves to ascii (or possibly > latin-1) filenames or use current 3.x. This is one of the (known) > unicode problems fixed in 3.x by making unicode the core text class, > replacing the implementation of unicode, and performing further work > with the new implementation. > > -- > Terry Jan Reedy Sorry, but no. >>> sys.version '2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]' >>> with open(r'd:\éüÄñoe.txt', 'r') as f: ... r = f.read() ... >>> print r, len(r) éabcéoe EURO z 9 >>>
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cannot open file with non-ASCII filename Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-14 16:24 +0000
Re: cannot open file with non-ASCII filename Terry Reedy <tjreedy@udel.edu> - 2015-12-14 13:34 -0500
Re: cannot open file with non-ASCII filename wxjmfauth@gmail.com - 2015-12-14 11:07 -0800
Re: cannot open file with non-ASCII filename eryk sun <eryksun@gmail.com> - 2015-12-14 12:45 -0600
Re: cannot open file with non-ASCII filename Laura Creighton <lac@openend.se> - 2015-12-14 19:51 +0100
Re: cannot open file with non-ASCII filename Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-14 22:11 +0000
Re: cannot open file with non-ASCII filename Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-14 23:41 +0100
Re: cannot open file with non-ASCII filename Laura Creighton <lac@openend.se> - 2015-12-15 01:07 +0100
Re: cannot open file with non-ASCII filename eryk sun <eryksun@gmail.com> - 2015-12-14 21:20 -0600
Re: cannot open file with non-ASCII filename eryk sun <eryksun@gmail.com> - 2015-12-14 17:55 -0600
Re: cannot open file with non-ASCII filename Laura Creighton <lac@openend.se> - 2015-12-15 01:13 +0100
Re: cannot open file with non-ASCII filename Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-15 08:26 +0000
Re: cannot open file with non-ASCII filename Laura Creighton <lac@openend.se> - 2015-12-15 15:09 +0100
Re: cannot open file with non-ASCII filename eryk sun <eryksun@gmail.com> - 2015-12-15 09:34 -0600
Re: cannot open file with non-ASCII filename Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-15 17:04 +0000
Re: cannot open file with non-ASCII filename eryk sun <eryksun@gmail.com> - 2015-12-16 21:39 -0600
Re: cannot open file with non-ASCII filename smap <askme.first@thankyouverymuch.invalid> - 2015-12-18 21:15 +0000
cannot open file with non-ASCII filename bearmingo <bearmingo@gmail.com> - 2015-12-17 21:12 -0800
Re: cannot open file with non-ASCII filename Terry Reedy <tjreedy@udel.edu> - 2015-12-18 01:37 -0500
csiph-web