Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: What's system attribute "__CF_USER_TEXT_ENCODING"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's system attribute "__CF_USER_TEXT_ENCODING"?

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 <>.

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
Do not post admin requests to the list. They will be ignored.

 >What's system attribute "__CF_USER_TEXT_ENCODING"? (From: bill <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.