• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unicode text and paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unicode text and paths


  • Subject: Unicode text and paths
  • From: jj <email@hidden>
  • Date: Thu, 02 Jun 2005 18:45:21 +0200

Hi all!

Most probably this has been covered before, but I don't know how can I find
something in the archives using "Unicode text" as search term. So, here is
the code:

############################
set someDir to choose folder

try
    (someDir as text) & "file"
    --> error if path contains Unicode characters (eg, japanese)
on error
    tell application "Finder" to (parent of someDir as Unicode text) & ¬
        (name of someDir) & ":file"
end try

--> result: "disk:dir:file"
############################

My old "modus operandi" to get a new path was coercing a folder to text,
then adding a new file name; and it still works fine in my machine.

But now I want support for any kind of Unicode text, and the "tell app
Finder" line seems a bit stupid, appart from slow.

So, does it exist a smart workaround for this simple task?


jj

--
http://www.macscripter.net/
http://www.osaxen.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Tiger and "open for access" ... changes?
      • From: Brian Johnson <email@hidden>
  • Prev by Date: Re: Standard Text item delimiters?
  • Next by Date: Re: EPS to JPEG
  • Previous by thread: Mount Volume and SMB
  • Next by thread: Tiger and "open for access" ... changes?
  • Index(es):
    • Date
    • Thread