473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

working with strings returned by Sqllite

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
1 1588
rdlong
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

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

Similar topics

3
by: Stefan Weiss | last post by:
Hi. The manual for pg_fetch_result() reads: | All forms of integer types are returned as integer values. All | forms of float, and real types are returned as float values. Boolean | is...
0
by: lawrence | last post by:
Can anyone share with me some code they are using involving transactions and SQLLite? Show me an update? Anything?
2
by: peter | last post by:
I am trying to truncate some Chinese Text returned from MySQL. If I use the substr function, then the last one or two chinese words would appear as symbols as opposed to the word it should be...
1
by: Steven Brown | last post by:
Hello, the documentation for string marshalling says that the runtime will free the memory of strings returned by unmanaged functions, like in: extern string foo(); The TestStringAsResult...
1
by: cornedbeef007-groups | last post by:
I have built a database for dog pedigrees. I want to be able to display the siblings for a dog on it's pedigree. I am able to find the names in my database, and at present return them from a UDF...
2
by: Jim S | last post by:
I have a .net framework 2.0 client (Pocket PC) and a .net 2.0 webservice that communicate on the same LAN. The Pocket PC has no problem consuming strings returned from the web service methoeds but...
9
by: | last post by:
I am interested in scanning web pages for content of interest, and then auto-classifying that content. I have tables of metadata that I can use for the classification, e.g. : "John P. Jones" "Jane...
2
by: Simon | last post by:
I have problems with connection strings. I have added new connection string to Web.config: <connectionStrings> <add name="ConnStr" connectionString="xxxxxxxxxxxxxxx"/> </connectionStrings> ...
3
by: nexes | last post by:
Hello All, I am having a minor problem when I try and do this: c.execute("insert into (MovieID,Transcript) Values(" + movieID + ",'" + formatText + "');") (don't even bother commenting of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.