Re: Funny Character/Unicode Support
Re: Funny Character/Unicode Support
- Subject: Re: Funny Character/Unicode Support
- From: Bill <email@hidden>
- Date: Sat, 13 Mar 2004 23:36:40 +0800
How do I handle funny characters in applescript. For example, if I
name a folder Latin Small Letter O with Breve (o with a u - Breve
above it), then I can't make an applescript alias to it to tell the
finder to open it. Anytime I try to compile the script it changes
the character to o (o followed by the Breve).
Is there no way to handle these characters in applescript. My script
goes through folders processing them and needs to handle special
characters.
Based on Chris's suggestion, you may consider these approaches:
-- case 1
-- create folder and open it
set uName to +data utxt006F0306;
tell application "Finder"
set oBreve to (make new folder at desktop with properties {name:uName})
open oBreve
end tell
-- case 2
-- if the folder is existed, try this one:
set uName to +data utxt006F0306;
tell application "Finder"
open (first folder of desktop whose name is uName)
end tell
-- case 3
-- reference to this folder, and make new folder in it with the same
name
set uName to +data utxt006F0306;
tell application "Finder"
set oRef to (first folder of desktop whose name is uName)
make new folder at oRef with properties {name:uName}
open oRef
end tell
In my experience, Script Editor does not have good unicode support, you
need to bypass the obstruction by either using code point in the
script, or read from external text file to get unicode text. Also, the
result pane of Script Editor sometimes, can't display unicode text
correctly.
bill
PS: what is the name of this funny character, and which language does
it belong to?
_______________________________________________
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.