• 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: String combining speed trick no longer works...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String combining speed trick no longer works...


  • Subject: Re: String combining speed trick no longer works...
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 03 Dec 2002 20:08:32 -0800

On 12/3/02 7:15 PM, "Matthew Stuckwisch" <email@hidden> wrote:

> ...if you plan on using Unicode text.
>
> I'm sure that we've all known about the {"a","b"} as string method to
> more rapidly join together strings in large numbers. While trying
> desperately to figure out why the caron-G, cedille-S, dotted-capital-I,
> and dotless-lowercase-I wouldn't work in my AS Studio program I found
> that the following will not function properly (at least not with some
> characters):
>
> set a to "a" as Unicode text
> set b to "b" as Unicode text
> set c to {a,b} as Unicode text
>
> As such, if you plan on using or even possibly any type of Unicode
> characters in a script or program, I strongly advise starting out using
> (a & b) instead of {a,b}

This is a very tricky topic. Apparently there are two different ways that
Latin-with-diacritics can be encoded in Unicode: as "pre-composed"
characters, and as "de-composed" basic-Latin-characters plus diacritics
(separately). I may have this backwards, but I believe that the characters
you're reading from Cocoa text fields, etc. are one type (pre-composed?),
and AppleScript does the other type (decomposed). It's a shame that Unicode,
which was supposed to remove all ambiguities, allows two different
"spellings" of these characters. As I understand it, the de-composed method
is better because it allows or every possible combination, even if they
aren't all used now. But the pre-composed method is much more practical for
languages that use them every day, and so they still exist and are used. I
probably have got this exactly right, but it's something along those lines.
Concatenation may preserve pre-composed characters but 'list-as-string'
methods may somehow enforce the standard de-composed characters. Or maybe
it's just a bug


Maybe an Apple person here can comment?


--
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: 
 >String combining speed trick no longer works... (From: Matthew Stuckwisch <email@hidden>)

  • Prev by Date: Strange text item delimiter effect
  • Next by Date: Re: Strange text item delimiter effect
  • Previous by thread: String combining speed trick no longer works...
  • Next by thread: Strange text item delimiter effect
  • Index(es):
    • Date
    • Thread