Umlauts, encodings, sitecustomize.py

F. GEIGER f.geiger at vol.at
Tue Nov 9 13:52:58 EST 2004


"Jeff Epler" <jepler at unpythonic.net> schrieb im Newsbeitrag
news:mailman.6167.1100019195.5135.python-list at python.org...

> You should note that chr(0x84) is *not* a-umlaut in iso-8859-1.  That's
chr(0xe4).  You may be using one of these Windows-specific encodings:
>     cp437.py:       0x0084: 0x00e4, # LATIN SMALL LETTER A WITH DIAERESIS
>     cp775.py:       0x0084: 0x00e4, # LATIN SMALL LETTER A WITH DIAERESIS
>     cp850.py:       0x0084: 0x00e4, # LATIN SMALL LETTER A WITH DIAERESIS
>     cp852.py:       0x0084: 0x00e4, # LATIN SMALL LETTER A WITH DIAERESIS
>     cp857.py:       0x0084: 0x00e4, # LATIN SMALL LETTER A WITH DIAERESIS
>     cp861.py:       0x0084: 0x00e4, # LATIN SMALL LETTER A WITH DIAERESIS
>     cp865.py:       0x0084: 0x00e4, # LATIN SMALL LETTER A WITH DIAERESIS

I'm not sure what you mean by this. Do mean I use one of these
accidentially? Or should I switch to one of these in my sitecutsomize.py?

I'm a bit confused. When I let Python print an ä (umlaut a) by simply
entering the 1-char string "ä", it prints '\x84'. When I let a tiny script
print the umlauts, I get:

sys:1: DeprecationWarning: Non-ASCII character '\xe4' in file
D:\Project\SchAG\Programme.Python\test.py on line 1, but no encoding
declared;
 see http://www.python.org/peps/pep-0263.html for details
These are Umlauts: õ÷³ and ?Í?.
These are Umlauts: ?Í? and õ÷³.
Press any key to exit...

There's the '\xe4' you are missing.


Thanks and kind regards
Franz GEIGER

P.S.: Do you know a site, where this whole matter is explained somehow?

P.P.S.: The script:

print "These are Umlauts: äöü and ÄÖÜ. "
s = "These are Umlauts: ÄÖÜ and äöü. "
print s
raw_input("Press any key to exit...")








More information about the Python-list mailing list