Convert on uppercase unaccentent unicode character
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. -- http://mail.python.org/mailman/listinfo/python-list
Re: Convert on uppercase unaccentent unicode character
Steve Holden wrote: > Duncan Booth wrote: >> [EMAIL PROTECTED] wrote: >> >>> On Oct 4, 7:35 am, JBJ >> [EMAIL PROTECTED]> 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 http://www.academie-francaise.fr/langue/questions.html#accentuation Regards -- http://mail.python.org/mailman/listinfo/python-list
Re: Convert on uppercase unaccentent unicode character
John Machin wrote: > On Oct 4, 4:35 am, JBJ [EMAIL PROTECTED]> 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. > > Google in this newsgroup for a thread started by "bussiere" on or > about 2006-03-25. The code snippet provided by Fredrik Lundh should > help you. Thanks -- http://mail.python.org/mailman/listinfo/python-list
