• 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-to-string bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode-to-string bug?


  • Subject: Re: Unicode-to-string bug?
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 23 Nov 2004 22:22:36 -0800

On 11/23/04 10:06 PM, "Shane Stanley" <email@hidden> wrote:

> If I run the following:
>
> set y to «data utxt0061» as Unicode text
> set x to «data utxt2011» as Unicode text
> " " & (y as string)
> " " & (x as string)
> " " & y
> " " & x
>
> I get an error on the last line:
>
> --> Can't make "-" into a string.
>
> I this just an AS bug? Or am I missing something?

It seems to be an inconsistency. «data utxt2011» as Unicode text
(non-breaking hyphen) is not an ASCII character like «data utxt0061». it
looks as if 'x as string' will coerce it to a regular hyphen (known to
Unicode as HYPHEN-MINUS), namely

    ASCII number (x as string)
    --> 45

(i.e. Unicode 002D)

but

    " " & x

which we expect to do an implicit coercion to string when concatenating
doesn't. I guess that's a bug.

By the way

   set z to «data utxt2010» as Unicode text
   " " & z
    --> " -"

It works OK with HYPHEN (2010), but not NON-BREAKING HPHEN ( 2011).

--
Paul Berkowitz


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Unicode-to-string bug?
      • From: "Shane Stanley" <email@hidden>
References: 
 >Unicode-to-string bug? (From: "Shane Stanley" <email@hidden>)

  • Prev by Date: Unicode-to-string bug?
  • Next by Date: Re: Unicode-to-string bug?
  • Previous by thread: Unicode-to-string bug?
  • Next by thread: Re: Unicode-to-string bug?
  • Index(es):
    • Date
    • Thread