Allowed coercions
Syntaxset worldlyStr to "A Unicode string" as Unicode text DescriptionUnicode text values reserve two bytes of memory for each character. This allows Unicode text to represent up to about 65,000 characters from languages throughout the world (Version 3.01 of the Unicode Standard defined more than 49,000 characters), including Arabic, Chinese, Japanese, Korean, and numerous others. The Unicode Standard is an evolving standard for international character encoding (see http://www.unicode.org). Prior to AppleScript Version 1.5.5, the Script Editor can only display Unicode text as raw data, but its class is preserved as Unicode text.
ExamplesThis AppleScript shows what a returned Unicode text value looks like in AppleScript Version 1.5.5 and later, and in AppleScript Version 1.4: set UnicodeStr to "Hi" as Unicode text (* returns<<data utxt00480069>> in AppleScript version 1.4; and "Hi" in version 1.5.5 and later*) The raw-data return value is comprised of the word <<data>> and the actual Unicode text data enclosed in guillemet symbols (<< >>). The Unicode text data begins with a four-character code representing the Unicode text class ("utxt") and then a hexadecimal representation of the characters in the string. These characters are represented as "00480069" inside of the raw-data return value. |