• 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
Re: Unicode, AppleScript, and the shell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode, AppleScript, and the shell


  • Subject: Re: Unicode, AppleScript, and the shell
  • From: John Delacour <email@hidden>
  • Date: Fri, 25 Jul 2003 01:08:55 +0100
  • Mac-eudora-version: 6.0a28

At 12:55 am +0100 25/7/03, John Delacour wrote:
set s to "qq~\\x{65e5}\\x{672c}\\x{8bed}~"
do shell script "perl -e 'print hello . " & s & "'"


Here's an example that creates a directory named <nihongo/ribenyu> in your home directory and opens it:

set s to "qq~\\x{65e5}\\x{672c}\\x{8a9e}~"
set _dir to quoted form of (do shell script "perl -e 'print " & s & "'")
do shell script "cd; mkdir " & _dir & "; open " & _dir


But so long as you have the path in the proper form, you don't need to play with codes at all. Once you have created the folder as above, you can choose it in a dialog and pass the path to a shell script, because here you are dealing with UTF-8 and not with UCS-2:


do shell script "open " & quoted form of POSIX path of (choose folder)


JD


.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: AppleScript --> HTML
  • Next by Date: Re: dynamic variables
  • Previous by thread: Re: Unicode, AppleScript, and the shell
  • Next by thread: Why is AS so poorly documented?
  • Index(es):
    • Date
    • Thread