Translation table to map Latin-1 to ASCII?

Rene Pijlman reageer.in at de.nieuwsgroep
Sun Jan 26 09:50:41 EST 2003


Martin v. Löwis:
           ^ you know the problem :-)
>Rene Pijlman wrote:
>> But I'm lazy and I was just hoping that someone
>> would have a similar translation table for Python's
>> string.translate lying around :-)
>
>I feel that it takes more time to post a message to usenet than to 
>actually write down the translation table. 

OK, OK, OK, ... :-) Here it is for whoever finds this in Google
someday.

accentstable = string.join(map(chr, range(192)), "") +
"AAAAAAACEEEEIIIIDNOOOOOxOUUUUYpBaaaaaaaceeeeiiiionooooo/ouuuuypy"

This also maps some funny characters which are not just accented
letters, but in this way it's all ASCII that I can post on
Usenet.

-- 
René Pijlman
   ^ me too




More information about the Python-list mailing list