Re: Unicode, AppleScript, and the shell
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.