More on 'there is a file it' returning false for files w/ non-Western European chars
Ken Ray
kray at sonsothunder.com
Tue Apr 15 22:47:11 EDT 2008
> ""Sarah
HD:Users:sarah:Desktop:cˇu˚.txt""
which tells me that the problem is
> Revolution, not the system.
It is very odd that not all accented characters
> cause this effect
I did a quick check and it turns out that these two characters are not high
ASCII characters (i.e. numToChar(129) to numToCar(255)), it's Unicode. I did
the same thing as Sarah, and named a file on the desktop "čů.txt". I then
ran this AppleScript from Script Editor:
set tFile to choose file of type {"TEXT"} with prompt "Get a file:"
get id of character -6 of (tFile as string)
This returned:
{99, 780}
As you can see, the "č" comes back as two IDs, which is I'm sure why
Revolution is showing the same two chars. Try this with a <255 ASCII
character, and you just get the number:
get id of character -3 of (tFile as string)
Returns:
116
So while Script Editor can convert the combined chars back to the proper
character, Rev doesn't seem to be able to do that... so it's still a bug in
that we have difficulty working with Unicode file names, but at least it has
an explanation...
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list