Re: Problem with non-ascii tags and work-around



The problem is in the Mono.Data.SqliteClient bindings to sqlite. Up
until version 1.1.10, all queries (and thus your tags), were
marshalled/converted to ASCII before being sent to sqlite. This creates
big problems.

The only real fix without imposing something like base64
encoding/decoding on data passed to queries in F-Spot, is to upgrade to
mono 1.1.10. 

--Aaron

On Wed, 2005-11-16 at 16:09 +0100, Stephane Delcroix wrote:
> Hi,
> 
> Each time I tried to create tags, I encounter a problem the next time I
> restart f-spot:
> --SNIP--
> Unable to find active server: Name 'org.gnome.FSpot' does not exist.
> 
> Unhandled Exception: System.NullReferenceException: Object reference not
> set to an instance of an object
> in <0x000c8> TagStore:LoadAllTags ()
> in <0x00050> TagStore:.ctor (Mono.Data.SqliteClient.SqliteConnection
> connection, Boolean is_new)
> in <0x000c2> Db:.ctor (System.String path, Boolean create_if_missing)
> in <0x001f6> Driver:Main (System.String[] args)
> --SNAP--
> 
> After some debugging with the source of the CVS version, I realized that
> the problem happens when loading Tags from the db, and only if the tags
> contains non-ascii characters... and I've a lot of friends with
> non-ascii characters in their names.
> 
> Note that f-spot handled such names correctly while the session is open
> and that the name are stored correctly in the db.
> 
> The faulty line generating an exception is this one (in TagStore.cs):
> 
> 	string name = reader [1].ToString ();
> 
> I know that this is probably not the perfect solution, but the attached
> patch below replaces unloadable names with a default string. This way, 
> I can restart f-spot without cleaning the db (and then, recreating all
> tags each time :( )
> 
> Stephane, now an happy f-spot user
> _______________________________________________
> F-spot-list mailing list
> F-spot-list gnome org
> http://mail.gnome.org/mailman/listinfo/f-spot-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]