Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?
Christian Gollwitzer
auriocus at gmx.de
Sun Sep 18 05:55:01 EDT 2016
Am 17.09.16 um 23:19 schrieb Thomas 'PointedEars' Lahn:
> Peng Yu wrote:
>
>> Hi, I want to convert strings in which the characters with accents
>> should be converted to the ones without accents.
>
> Why?
>
>> […]
>> ./main.py Förstemann
>
> AFAIK, “ä”, “ö”, and “ü” are not accented characters in any natural
> language, but characters of their own (umlauts).
>
> In particular, I know for certain that they are not accented in Germanic
> languages. Swedish has been mentioned; I can add my native language,
> German, to that list.
In German, they are letters, but they collate as either ae, oe, ue
(rarely) or a, o, u (modern style). Ad dictionary or phone book does not
have an "ö" section in Germany. Example from a German-Latin dictionary,
printed in 1958
Laster -> vitium
Lästerer -> homo maledicus
lasterhaft -> vitiosus
If "ä" would sort as a single letter, "Lästerer" would be the last
entry. If it would sort as "ae", it would be the first entry. Therfore,
in this example it sorts as "a", with "ä" > "a" to resolve a tie only.
Christian
More information about the Python-list
mailing list