Re: [Tracker] [Patch] Correct locales support
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Laurent Aguerreche <laurent aguerreche free fr>
- Cc: tracker-list gnome org
- Subject: Re: [Tracker] [Patch] Correct locales support
- Date: Wed, 30 Aug 2006 17:01:04 +0100
Laurent Aguerreche wrote:
Le mardi 29 aoÃt 2006 Ã 12:39 +0100, Jamie McCracken a Ãcrit :
Laurent Aguerreche wrote:
They correctly appear with 'g_async_queue_try_pop
(tracker->file_process_queue)' during process but are not indexed since:
- info->mtime == info->indextime == 0...
- action is TRACKER_ACTION_FILE_CHECK
so index_file() is not called.
this is likely a problem in the stat call - it wont find the file with a
non-utf8 filename in those cases
The solution would be to use g_filename_from_utf8
(http://developer.gnome.org/doc/API/2.0/glib/glib-Character-Set-Conversion.html)
to convert utf8 filename back to user's encoding before calling stat
and before calling the metadata extraction stuff.
its tricky because we must avoid passing any non utf8 string to any
other glib function
I dont have time at the moment to fix these as I am at work so patches
welcome.
I almost finished.
great!
Basically all calls to system (lstat, stat, g_file_test(G_FILE_EXISTS),
etc.) need to use strings in locale, not in UTF-8 in trackerd.
yes - we used g_filename_to_utf8 in tracker so you must use
g_filename_from_utf8 to do the reverse
For clients, any sent string must be encoded in utf8.
It seems there is still some issues with tracker-extract but they should
go quickly.
tracker-extract uses glib and libextractor also uses glib so I dont know
whether it needs changing - please experiment for whats best
But sometimes I wonder where to declare variables or why many lines are
left empty!
Do you want to declare variables as close as their first use or at
beginning of block only?
It should be interesting to define some coding style rules and follow
them.
if they are used throughout the function then they should obviously be
declared at the top. If they are local to a small code block then I dont
mind
lines are left empty for neatness
coding rules are to follow whats there already (lower case functions and
vars, 8 space tab indent, "{" on same line as if/while block etc)
thanks for investing your time in this area!
--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]