Unicode in file paths...

Paul Dupuis paul at researchware.com
Fri May 8 12:30:13 EDT 2015


On 5/7/2015 12:42 AM, Richard Gaskin wrote:
> Fails:
> - OS X 10.7   QuickTime
> - OS X 10.6   QuickTime
>

For clarification for any one following this thread: The above
combinations work. I had an error in my code that had the original tests
fail.

Using LC704, file references for media that include Unicode in the name
and/or path, work on OSX10.6 and 10.7 using Quicktime, and 10.8 and up
using AVFoundation. In LC704 under OSX, you can just:
answer file "Pick a media file:"
set the filename of player x to it

Strangely, Unicode file references do not work under Windows UNLESS you
set the fileName of player x to ShortFilePath(tFileSpec). Example:

answer file "Pick a media file:"
set the filename of player x to it

fails with an invalid movie reference error but:

answer file "Pick a media file:"
set the filename of player x to ShortFilePath(it)

works on Windows XP through 8.1. This seems like a bug that you can not
use the full Unicode file reference on Windows, but it has an easy
work-around with the ShortFilePath function.




More information about the use-livecode mailing list