Problem with revExecuteSQL - More

Martin Baxter mb.userev at harbourhosting.co.uk
Thu Nov 1 16:05:32 EDT 2007


Hi Dave,

Looks like at some point the ampersand is being converted to an entity
reference of itself.

ampersand is character number 38

The entity reference for that is & <ampersand hash 38 semicolon>

That means that the ampersand you see is no longer a literal character
in this case, but indicates the beginning of a character entity
reference. The semicolon indicates the end. The entity reference is
presumably intended to ensure that the original ampersand in your data
doesn't get interpreted as a control character.

% is the entity reference for % (percent), $ is the reference
for $ dollar and so forth.

I don't know what is doing this in your case, but I think this must be
what's happening. Hope that sheds some light.

Martin


Dave wrote:
> Hi,
> 
> The path is coming out of the iTunes XML file. It's not just this path,
> it's a load of them, for instance there are a lot of instances that
> wherever there is an ampersand it is followed by #38; There are files
> that have funny accents that cause the problem too, If I read back the
> same track using AppleScript the weird characters are not there.
> 
> I think that the tracks where this occurs were imported from a PC.
> 
> Thanks a lot
> All the Best
> Dave
> 
> On 1 Nov 2007, at 19:22, Ian Wood wrote:
> 
>> It looks like the folder name has been abbreviated at some stage by an
>> OS that didn't understand file/folder names that long.
>>
>> Where *exactly* is the filepath coming from?
>>
>> Ian
>>
>> On 1 Nov 2007, at 18:01, Dave wrote:
>>
>>> However I now have a another weird problem, I have a field that
>>> represents a file path, in this case the path is:
>>>
>>> /Users/Dave/Music/iTunes/iTunes Music/Blank & Jones/Addicted To
>>> Trance (Disc 1)/11 DJs, Fans And Freaks.mp3
>>>
>>> However a "if there is a file" fails on this path. When I look I
>>> can't see the & in the file name. I'm guessing it's something to
>>> do with UTF16 vs UTF8 or something, but I'm not sure how to resolve
>>> it. The database I am writing is set to UTF8 which AFAIK is the only
>>> option for SQLite.
>>
>> _______________________________________________
>> 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
> 
> _______________________________________________
> 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