Re: Nice unicode -> ascii translation?

2006-08-07 Thread skip
crowell> However, I'd like to see the more sensible "Bela Fleck" instead crowell> of dropping '\xe9' entirely. Assuming the data are in latin-1 or can be converted to it, try my latscii codec: http://orca.mojam.com/~skip/python/latscii.py Skip -- http://mail.python.org/mailman/li

Re: Nice unicode -> ascii translation?

2006-08-07 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > The trick is finding the right . Has someone attempted this > before, or am I stuck writing my own solution? In this specific example, there is a different approach, using the Unicode character database: def strip_combining(s): import unicodedata # Expand

Re: Nice unicode -> ascii translation?

2006-08-06 Thread John Machin
[EMAIL PROTECTED] wrote: > I'm using the ID3 tag of an mp3 file to query musicbrainz to get their > sort-name for the artist. A simple example is "The Beatles" -> > MusicBrainz -> "Beatles, The". I then want to rename the mp3 file > using this information. However, I would like the filename to c

Re: Nice unicode -> ascii translation?

2006-08-06 Thread Brian Beck
[EMAIL PROTECTED] wrote: > The trick is finding the right . Has someone attempted this > before, or am I stuck writing my own solution? You want ASCII, Dammit: http://www.crummy.com/cgi-bin/msm/map.cgi/ASCII +Dammit -- Brian Beck Adventurer of the First Order -- http://mail.python.org/mail

Nice unicode -> ascii translation?

2006-08-06 Thread crowell
I'm using the ID3 tag of an mp3 file to query musicbrainz to get their sort-name for the artist. A simple example is "The Beatles" -> MusicBrainz -> "Beatles, The". I then want to rename the mp3 file using this information. However, I would like the filename to contain only ascii characters, whi