Hello,
a filename may be invalid (from a UTF8 point of view) but the content
may be perfectly valid. This happens, for example, when importing files
in a locale (FAT32) to locale (UTF8). This leads for example to files
named as:
Vincent Delerm - 11 - L'heure du th�.mp3

instead of
Vincent Delerm - 11 - L'heure du thé.mp3



Unfortunately, Tracker skips on such file. The attached patch fix the
problem by replacing g_filename_to_utf8() with g_filename_basename(),
which always returns a valid UTF8 filename.

There are other occurences g_filename_to_utf8() that perhaps need to be
changed but I was not sure on those. Therefore this patch is just a
sugestion, and perhaps not the best way to fix the problem.


Best,
Julien

Index: tracker/src/trackerd/tracker-utils.c
===================================================================
RCS file: /cvs/gnome/tracker/src/trackerd/tracker-utils.c,v
retrieving revision 1.38
diff -u -r1.38 tracker-utils.c
--- tracker/src/trackerd/tracker-utils.c	19 Oct 2006 01:27:41 -0000	1.38
+++ tracker/src/trackerd/tracker-utils.c	30 Oct 2006 12:46:30 -0000
@@ -1444,7 +1444,7 @@
 				return NULL;
 			}
 
-			str = g_filename_to_utf8 (name, -1, NULL, NULL, NULL);
+			str = g_filename_display_basename(name);
 
 			if (!str) {
 				continue;
_______________________________________________
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to