Unicode in file paths...

Peter Haworth pete at lcsql.com
Wed May 6 20:06:25 EDT 2015


I think you should be able to use uniDecode to convert the filename string
to its Unicode equivalent.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Wed, May 6, 2015 at 4:08 PM, Paul Dupuis <paul at researchware.com> wrote:

> I am trying to simply prompt for a movie file and set the filename of a
> player to that filespec. Essentially:
>
> answer file "Pick a movie:"
> set the fileName of player 1 to shortFilePath(it)
>
> If I have a movie file, say video.mov in a folder with Unicode
> characters, say "Κάποια έρευνα" (Greek), the answer file command in
> LC6.7.4 returns a string (i.e. C:/Users/Paul/Desktop/HR400-LC674/Media
> Testing/??p??a ??e??a/video.mp4) that is not recognized by the player
> object for accessing that file. The same movie file is recognized on OSX
> or Win if it is in a file path with no Unicode characters in it.
>
> Under LC 7.0.4, answer file returns a legible filespec (i.e.
> C:/Users/Paul/Desktop/HR400-LC674/Media Testing/Κάποια
> έρευνα/video.mp4), and the player recognizes the movie under Windows
> (using Quicktime - this is because of the use of the shortFilePath
> function, without shortFilePath, QT does not recognize a filespec with
> Unicode in it) and under OSX 10.8+ using the AVFoundation. However, it
> fails under OSX 10.7 and 10.6 (using QT instead of AVF)
>
> Given that every OS today support robust folder and file names, my
> question is: Is there any work around for this in LC6.7.4 (or 6.7.5)?
>
> I can not migrate to LC7 just now - we have too much code tied to the
> old way Unicode works that need to be updated and perhaps a zillion
> places where 'char' is used on binary data that need to be updated to
> byte. However, if I could go to LC7, it appear that you still can not
> play movies with Unicode in the file path under OSX10.6 or 10.7 (i.e QT
> under OSX) or is there a workaround for that?
>
> If there is anyone who has cracked this nut, help would be much
> appreciated.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list