unicode issue

Rami Chowdhury rami.chowdhury at gmail.com
Thu Oct 1 18:06:15 CEST 2009


On Thu, 01 Oct 2009 09:03:38 -0700, Walter Dörwald <walter at livinglogic.de>  
wrote:
>
> Yes, but any accented characters have been split into the base character
> and the combining accent via normalize() before, so only the accent gets
> removed. Of course non-decomposable characters will be removed
> completely, but it would be possible to replace
>
>    .encode("ascii", "ignore").decode("ascii")
>
> with something like this:
>
>    u"".join(c for c in name if unicodedata.category(c) == "Mn")
>
> Servus,
>    Walter

Thank you for the clarification!

-- 
Rami Chowdhury
"Never attribute to malice that which can be attributed to stupidity" --  
Hanlon's Razor
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)



More information about the Python-list mailing list