Hi, I'm writing a program that goes through all of the music in a user-specified directory and I am having some trouble with Unicode characters. More specifically, 'ascii' codec can't encode character u'\\xe7' . The song names need to both be printed to a HTML page as well as be passed to other HTML/CGI pages via the GET method.

What can I do to be more aware of these evil Unicode characters? I tried to simply convert to Unicode where I could in my program but then there comes the trouble of keeping this consistent among the databases and song names/albums/artists they are tied to. Also, I seemed to have trouble looking up things in a dictionary when they had inconsistent encoding.

What do all you intelligent people of the Python forum recommend?

6 Years
Discussion Span
Last Post by SoulMazer

That was a great presentation. It took me a second to figure out I had to click to advance the slides.

Okay, then just one last question. Can I write to a database (via sqlite3) in Unicode? Or what should I do?


This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.