A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-February/042570.html below:

[Python-Dev] Source encoding doubt

[Python-Dev] Source encoding doubt [Python-Dev] Source encoding doubtGustavo Niemeyer niemeyer at conectiva.com
Sun Feb 15 19:47:36 EST 2004
Hello!

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')

-- 
Gustavo Niemeyer
http://niemeyer.net

More information about the Python-Dev mailing list

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