Convert on uppercase unaccentent unicode character

Steve Holden steve at
Thu Oct 4 12:08:35 CEST 2007

JBJ wrote:
> Steve Holden wrote:
>> Duncan Booth wrote:
>>> timaranz at wrote:
>>>> On Oct 4, 7:35 am, JBJ <Jean-Bernard.jacquet-at-tele-deux-
>>>> point... at> wrote:
>>>>> Hi,
>>>>> I'am very newbie in Python.
>>>>> For the moment I'am trying to convert an unicode character to his
>>>>> uppercase unaccented character.
>>>>> By example with locale fr_FR:
>>>>> a,A,à,À should return A
>>>>> o,O,ô,Ô should return O
>>>>> ?,? should return ?
>>>>> i,I,î,Î should return I
>>>>> Have you some suggestions ?
>>>>> Thank.
>>>> Unicode strings have an upper() method - try that.  I'm think it
>>>> should work properly with your locale - it doesn't give the expected
>>>> result for me with an english locale.
>>> No, that will uppercase the string, but it doesn't (and shouldn't) strip
>>> the accents:
>> I can agree that is doesn't (though I am taking your word for it), but a
>> French person will definitely feel it's doing the wrong thing. Upper
>> case letters aren't accented in written French.
>> regards
>>   Steve

Malheureusement, I see that absence of accented capitals is a modern 
phenomenon that is regarded as an impediment to the language mostly 
stemming from laziness of individual authors and inadequacy of low-end 
typesetting software. I hadn't realised I was so up-to-date ;-)

So I will have to stop propagating this misinformation.

Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd 
Skype: holdenweb

Sorry, the dog ate my .sigline so I couldn't cat it

More information about the Python-list mailing list