Foreign characters in file names

index at kenjikojima.com index at kenjikojima.com
Sat Apr 13 11:41:06 EDT 2013


Hi Thomas,
If you are on Mac OS, you can use AppleScript.

This is for two bytes file name of UTF8 text.

on mouseUp
   put "choose file with prompt" &quote&quote&return into asScript
   put "set openFile to result"&return after asScript
   put "try"&return after asScript
   put "read openFile" & return after asScript
   put "on error"&return after asScript
   put "close access openFile"&return after asScript
   put "display dialog "&quote&"Error is occured."&quote&return after asScript
   put "return"&return after asScript
   put "end try"&return after asScript
   do asScript as appleScript
   put the result into tUTF8Text
   delete char 1 of tUTF8Text
   delete char -1 of tUTF8Text
   set the unicodeText fld 1 to uniencode(tUTF8Text,UTF8)
end mouseUp

--
Kenji Kojima / 小島健治
http://www.kenjikojima.com/


On Apr 13, 2013, at 10:19 AM, Thomas Fischer wrote:

> Hello,
> 
> I have a problem with foreign characters in file names, like Cyrillic or Japanese.
> E.g. I didn't find a way to get the correct name of a folder "Bilder Ж" either using "answer folder…" or dragDrop with dragData.
> Is there a way to handle this situation?
> 
> Best regards
> Thomas Fischer
> 
> 
> 
> 
> _______________________________________________
> 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