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?

Recommended Answers

All 4 Replies

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?

Thanks.

Perfect. Thanks Gribouillis. Problem solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.