• 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: Weird
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird


  • Subject: Re: Weird
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 17 Oct 2002 16:01:33 -0700

On 10/17/02 2:52 PM, "John Delacour" <email@hidden> wrote:

> At 12:11 pm -0700 17/10/02, Chris Espinosa wrote:
>
>> One of two things is happening. Either the string-to-Unicode coercion
>> is promoting ASCII character 202 to the same Unicode character that
>> ASCII character 32 coerces to (so the space characters are in fact
>> identical, therefore one does contain the other); or the underlying
>> Unicode string comparison utilities that AppleScript uses are being
>> liberal and considering all spaces to be equal. That may not be what
>> you want in this particular circumstance, but in many other
>> circumstances, it is -- others may not want a script to fail when it's
>> looking for a space between two names just because it happens to be a
>> wider or thinner space than normal.
>
> For what it's worth, Mac character 202 (U+00A0) is neither thinner
> nor fatter by nature than a space but is distinguished only by its
> non-breaking quality. There are at least a dozen other Unicode
> characters that have do have relative width as a characteristic, such
> as the em space etc. I doubt very much if a special routine has been
> devised for AppleScript to enable it to second-guess its small band
> of users and question their typographical skills, but who knows? Who
> will ever know anthing about the deep and disturbed psyche of
> AppleScript?
>
And it's not particularly difficult to include all the different spaces if
that's what you want. In this instance I particularly wanted to get rid of
option-spaces, not regular spaces. I don't understand why AppleScript was
deciding for me that, if it's Unicode, I "really" must have meant all
spaces. I didn't mean all spaces, I meant option-space, and that's why I
specified the somewhat obscure ASCII character 202 and not the 'space'
constant. The distinction is honored for 'string'; why not for Unicode?

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

  • Follow-Ups:
    • Re: Weird
      • From: Matthew Smith <email@hidden>
References: 
 >Re: Weird (From: John Delacour <email@hidden>)

  • Prev by Date: RE: Listing running applications
  • Next by Date: Re: Weird
  • Previous by thread: Re: Weird
  • Next by thread: Re: Weird
  • Index(es):
    • Date
    • Thread