> I'm wondering what I misunderstood in PEP263. In the following example, > shouldn't it work correctly, showing 'áéíóú', as far as my terminal > accepts ISO-8859-1? > > #!/usr/bin/python > # -*- coding: utf-8 -*- > s1 = "\xc3\xa1\xc3\xa9\xc3\xad\xc3\xb3\xc3\xba" > s2 = u"\xc3\xa1\xc3\xa9\xc3\xad\xc3\xb3\xc3\xba" > print s1.encode('iso-8859-1') > print s2.encode('iso-8859-1') Argh.. ok, understood. I need some sleep. These strings are not unicode, but escapings of unicode strings. -- Gustavo Niemeyer http://niemeyer.net
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