• 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: Christopher Nebel <email@hidden>
  • Date: Thu, 24 Jul 2003 11:47:56 -0700

On Thursday, July 24, 2003, at 10:00 AM, Sean McBride wrote:

My only problem remaining is how to have a literal unicode string in my code, as I can't use something like 'choose file', I need to hardcode the japanese names in my script. I am willing to use illegible escape sequences. :)

I tried this:

tell application "Finder"
set a to "hello" as Unicode text
set b to +data utxt30A4; as Unicode text
set c to a & b
end tell

but Script Editor crashes.

Several suggestions: first, your <<data utxt...>> trick should have worked, but didn't because of a bug. It should be fixed in the next release.

Second, it's possible to type Japanese string constants in Japanese, but you have to run your entire system in Japanese for it to really work. Since this is how most Japanese users do things, it works for them, but for people who want to straddle languages it's awkward.

Third, if you really are willing to use illegible escape sequences, you might be able to work around the crash by translating the entire command into a <<data...>> sequence. For example:

do shell script +data utxt006500630068006F002000680065006C006C006F; --> "hello"


--Chris Nebel
Apple Development Tools
_______________________________________________
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.

  • Follow-Ups:
    • Re: Unicode, AppleScript, and the shell
      • From: "Sean McBride" <email@hidden>
References: 
 >Re: Unicode, AppleScript, and the shell (From: Paul Berkowitz <email@hidden>)
 >Re: Unicode, AppleScript, and the shell (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: dynamic variables
  • Next by Date: Re: vpnclient...
  • Previous by thread: Re: Unicode, AppleScript, and the shell
  • Next by thread: Re: Unicode, AppleScript, and the shell
  • Index(es):
    • Date
    • Thread