Re: What's system attribute "__CF_USER_TEXT_ENCODING"?
Re: What's system attribute "__CF_USER_TEXT_ENCODING"?
- Subject: Re: What's system attribute "__CF_USER_TEXT_ENCODING"?
- From: Christopher Nebel <email@hidden>
- Date: Thu, 29 Aug 2002 12:46:16 -0700
On Thursday, August 29, 2002, at 09:38 AM, bill wrote:
In standard addition, there's a command system attribute, one of the
options
is :
system attribute "__CF_USER_TEXT_ENCODING"
-- "0x1F5:0:0"
Anyone knows what's that?
If you're asking what "system attribute" does, it's a command that lets
you get the value of any environment variable or Gestalt selector.
(The ability to get environment variables was added in AppleScript 1.8
for Mac OS X.)
Gestalt selectors are always four characters long and return a number.
They were originally invented to allow testing for specific features;
the most commonly used one in scripts is "sysv", which returns the
system version in hexadecimal. For a complete list of selectors and
what the numbers mean, see Gestalt.h -- there's a copy in my iDisk
<
http://homepage.mac.com/c.nebel>.
Environment variables always have text results, and are a Unix-ism that
exists to tell you various useful things. They typically have
all-uppercase names, but don't have to. For example, 'system attribute
"SHELL"' will return the POSIX path of your default shell.
If you're asking what __CF_USER_TEXT_ENCODING means, it's a
representation of your default text encoding, which is determined by
the first language in the Languages list in the International
preference panel. I don't know exactly how to interpret it, though.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.