• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unicode, AppleScript, and the shell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode, AppleScript, and the shell


  • Subject: Re: Unicode, AppleScript, and the shell
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 22 Jul 2003 17:17:09 -0700

On 7/22/03 4:26 PM, "John Delacour" <email@hidden> wrote:

> Never try to concatenate a 'string' (eg. "open ") with Unicode text.

It just follows the normal AppleScript concatenation rules that "left side
wins" when concatenating items of different classes which can be coerced to
each other. Thus "open " - an ASCII string on the left hand side - would
coerce the Unicode on the right-hand side to ASCII string, turning non-ASCII
characters into "?" or funny stuff in the process, as John implies. But you
can easily avoid that if you need to concatenate text, by

"open " as Unicode text & unicodeTextVariable

And if the Unicode is on the left and ASCII text on the right, a straight
concatenation will coerce it all to Unicode. ASCII strings coerced to
Unicode have the "same" characters (but as Unicode, of course), and
non-ASCII text will not get distorted.

--
Paul Berkowitz
_______________________________________________
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.

References: 
 >Re: Unicode, AppleScript, and the shell (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Why is AS so poorly documented?
  • Next by Date: Sandi's Additions for OS X??
  • Previous by thread: Re: Unicode, AppleScript, and the shell
  • Next by thread: Re: Unicode, AppleScript, and the shell
  • Index(es):
    • Date
    • Thread