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

Re: Bad Character


  • Subject: Re: Bad Character
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 28 Sep 2007 09:11:44 -0500

More comment:

Update and clarification. This snippet of code should explain something about what is happening ...

tell application "Mail"
...
set subText to (subject of msg)
end tell
--
set badChar to (character 57 of subText)
display dialog ((class of subText) as text) & space & (ASCII number of badChar)
----> Unicode text 63

The 'ASCII number' function correctly translates 'badChar' to "?" before reporting the value 63.


--
set subText to (subText as text)

But something goes wrong here. 'badChar' should translate to "?" (ascii 63), but instead, '... as text' translates 'badChar' to ascii number 138.


--
set badChar to (character 57 of subText)
display dialog ((class of subText) as text) & space & (ASCII number of badChar)
----> string 138

I need to experiment more with strings containing ascii number 138.




_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Bad Character (From: Luther Fuller <email@hidden>)
 >Re: Bad Character (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Bad Character
  • Next by Date: Re: Bad Character
  • Previous by thread: Re: Bad Character
  • Next by thread: Re: Bad Character
  • Index(es):
    • Date
    • Thread