Now that I can edit UTF-8 directly, I find a "feature" made possible by the PEP 263 support of Python 2.3 rather puzzling: Let's say I edit a file testencoding.py in XEmacs with UTF-8 support: # -*- coding: utf-8; -*- # comment =E4=F6=FC s =3D "=E4=F6=FC" u =3D u"=E4=F6=FC" print s print u.encode('latin-1') print 'works !' With Python 2.3 this prints: =C3=A4=C3=B6=C3=BC =E4=F6=FC works ! I would have expected that s turns out as "=E4=F6=FC" using print, since that's how I wrote it in the source file. This suggests to me that mixing string and Unicode literals using non-ASCII characters in a single file should probably be avoided. --=20 Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4