Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107921
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: about special characters |
| Date | 2016-04-30 15:36 -0400 |
| Message-ID | <mailman.268.1462044980.32212.python-list@python.org> (permalink) |
| References | <CAJ7mry+o=PRGtM46HPGdNVqaowy3tmheJKu38nRy4y_QEjqV-w@mail.gmail.com> <mailman.234.1461973268.32212.python-list@python.org> <572403de$0$1601$c3e8da3$5496439d@news.astraweb.com> <CAJ7mryKF5N4crnz2Lu36JC=LiqCKYCtwjgoV4U_=h4=ovN6Q6w@mail.gmail.com> <ng31f7$368$1@ger.gmane.org> |
On 4/30/2016 2:13 PM, Jianling Fan wrote: > I am using python 2.7 in Windows 7 Enterprise version. > > Here is the the filename that cause the problem: "Decock-2013-On the > potential of δ18O and δ15N.pdf" > When I delete the "δ" in the filename, the script works good. You may be able to get "δ" (and other Greek characters) to work on your system with 2.7, but if you want to be able to work with any filename on Windows, get Python 3.4 or later and use text strings, not byte strings. You may someday run into a Name-your-title.pdf file name with other 'strange' characters from other Windows filenames are unicode strings and are stored, I believe, with utf-16 encoding. Even in early 3.x versions, there were Windows path problems, for instance with east Asian characters. Multiple 3.x patches seem to have fixed the problems. So merely using unicode is not, in general, sufficient. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
about special characters Jianling Fan <fanjianling@gmail.com> - 2016-04-29 17:33 -0600
Re: about special characters Steven D'Aprano <steve@pearwood.info> - 2016-04-30 11:01 +1000
Re: about special characters Jianling Fan <fanjianling@gmail.com> - 2016-04-30 12:13 -0600
Re: about special characters Terry Reedy <tjreedy@udel.edu> - 2016-04-30 15:36 -0400
Re: about special characters MRAB <python@mrabarnett.plus.com> - 2016-04-30 20:42 +0100
Re: about special characters Jianling Fan <fanjianling@gmail.com> - 2016-04-30 13:48 -0600
csiph-web