about special characters
Terry Reedy
tjreedy at udel.edu
Sat Apr 30 15:36:06 EDT 2016
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
More information about the Python-list
mailing list