By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,818 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,818 IT Pros & Developers. It's quick & easy.

working with strings returned by Sqllite

P: 2
I've written a python function that retrieves data from a sqlite (Banshee - Linux music player's) database, ultimately ending up with a path/file name. That name appears to be in an "enhanced ASCI" hybrid encoding, using %20 for spaces, and, as an example KUSG%C3%96Z - %C3%96 is a capital O umlaut (the string is KUSGÖZ). I'm using the path/file to copy files from one location to another. Replacing %20 with a space works for path/files with only standard characters, but I haven't been able to figure out what to convert %C3%96 to (or how to properly encode it.
I've tried replacing the string with the escaped characters with the actual string, but python rejects that

Banshee 1.6.1
Ubuntu 10.04 LTS
Python 2.6.5
Mar 17 '11 #1
Share this Question
Share on Google+
1 Reply

P: 2
just made a breakthrough - changing the string from KUSG%C3%96Z to KUSG\xC3\x96Z, and using the latin-1 encoding seems to do the conversion I need.
Leave the posting, hopefully it might spare some one else a couple hours of head banging.
Mar 17 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.