ANN: Some routines for Spotlight

Andre Garzia soapdog at mac.com
Sun Aug 21 15:20:52 EDT 2005


Yves,

I am trying here with accents and special chars... it appears that  
mdfind returns a mixed string.  Like I have this file called çedilha  
(which is wrong portuguese, but serves right for our experiments).  
mdfind will return a string using with the ç encoded in what I think  
is more than two bytes and the rest of the filename in good plain  
text. So using uniDecode to reduce from twobytes representation will  
screw the rest of the filename, using uniEncode to put the rest of  
the string up to two bytes will also not work for it will re-encode  
the special chars...

I am a little lost too, need more expert help.

Andre




On Aug 21, 2005, at 3:58 PM, Yves COPPE wrote:

>
> Le 21-août-05 à 19:53, Andre Garzia a écrit :
>
>
>> Folks,
>>
>> Since I started using MacOS X Tiger, I became very fond of  
>> Spotlight since it reminds me of BFS.
>>
>> Spotlight has support for very advanced queries using nested  
>> boolean logic and cool metadata filters but those features are not  
>> exposed in the normal spotlight ui. To access those functions you  
>> need to code your query using Objective-C or use command line tools.
>>
>> By the use of shell() command we can harvest most of the spotlight  
>> power by calling commandline tools, the spotlight command line  
>> tools start with md (from metadata).
>>
>
>
> Hi Andre,
>
>
> I have a little problem with your function.
>
> In Mac OS X French you have accent, umlaut, cedilla,...
>
> so my script :
>
>  put mdfind(tSearch) into tmp
> gives unreadable result
>
> so I've tried :
>
>  put urldecode(tmp) into tmp
>
>  put isotomac(tmp) into tmp
>
>
> but it stays unreadable
>
>
> when you ask for the detailed fiiles and urldecode the result, then  
> are the lines readable.
>
>
> How can I perform that ?
>
> Thank you
>
>
> Greetings.
>
> Yves COPPE
> yvescoppe at skynet.be
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list