• 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: When a string is not a string for Palm Desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When a string is not a string for Palm Desktop


  • Subject: Re: When a string is not a string for Palm Desktop
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 2 May 2003 15:21:05 -0700

On Friday, May 2, 2003, at 04:07 AM, Richard Morton wrote:

Must be 'international text' then I guess. ;) Somewhere along the line the string - a full path - was made up using some Unicode perhaps. I coerce it to string in the script & under OS 8/9 it was always plain text, but under X it's styled.

Yes, because paths under Mac OS X are technically all Unicode. When you coerce Unicode text to a string, it applies style information in order to preserve the encoding information as best it can. Remember, by throwing away the style information, you are losing information and possibly corrupting the string.

Insofar as I was complaining, it was more that I couldn't remove the style from the string without a hack & the fact that AS is opaque about the class - if it's international text, then it would be handy if AS would tell me so.

Internally, there's no such thing as "international text"; that's merely a transport format. Once it makes it into AppleScript, it's no longer international text, it's merely a string which may have style information.

PD 4.1 baulks at setting one of its text fields to this, though older versions dealt with it OK. The script returns the error "Can't make <<script>> into a string"

Unfortunately, it looks like you found a bug here. When you set the title of a memo Palm Desktop tries to coerce the value to a Pascal string ('pstr'), which fails. Coercing to text ('TEXT') seems to work, though.

Note to implementors: Use of any implicitly encoded text type (i.e., typeText, typePString, and typeCString) is strongly discouraged in Mac OS X, because they're incapable of representing international data. Use of typePString and typeCString is especially discouraged, because they don't support the full range of text coercions. This would reasonably be considered a bug, but probably not one very high on our list, since we want those types to die anyway.


--Chris Nebel
Apple Development Tools
_______________________________________________
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: When a string is not a string for Palm Desktop
      • From: Chris Page <email@hidden>
References: 
 >Re: When a string is not a string for Palm Desktop (From: Richard Morton <email@hidden>)

  • Prev by Date: Unicode/UTF confusion
  • Next by Date: open for access question
  • Previous by thread: Re: When a string is not a string for Palm Desktop
  • Next by thread: Re: When a string is not a string for Palm Desktop
  • Index(es):
    • Date
    • Thread