• 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
Mail UTF-7 Script -- final
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mail UTF-7 Script -- final


  • Subject: Mail UTF-7 Script -- final
  • From: John Delacour <email@hidden>
  • Date: Thu, 19 Sep 2002 15:32:38 +0100

Here, finally, is a version of the UTF-7 conversion script for users of Mail which will actually be readable by Mail users.

I have used a different method than the one suggested by John Coelho to coerce the Unicode text in the Mail message to a string.

TEC.osax is required to run this script, unless you use Smile, in which case you need to change the conversion syntax.

If you run the script with this message frontmost you will get the message in TextEdit and, provided you have not skimped on you OS installation, you will be able to read four lines of Anacreon in polytonic Greek.

OE and Entourage will probably choke on this bit. I posted a script recently to allow Eudora users to display Unicode.

Please try the script and let me know the result.



+A6YDuQO7H/Y +A7MfcwPBA78DvQPEA7E +A8QDtQPBA8ADvR94A70,
+A8YDuQO7H/Y +A70fcwO/A70 +A8cDvwPBA7UDxQPEH3UDvQ.
+A7MfcwPBA8kDvQ +A7QgGQ +H0UDxAOxA70 +A8cDvwPBA7Ufex/D,
+A8QDwR93A8cDsQPC +A7MfcwPBA8kDvQ +A7wfcwO9 +HxADwwPEA7k,
+A8QfcAPD +A7Qfcg +A8YDwR9zA70DsQPC +A70DtR9xA7YDtQO5.



(* Display a UTF-7 encoded Mail message as Unicode in TextEdit *)

set {d, tmp} to {current date, path to temporary items}
set n to d - (get date (("1/1/" & (d's year) + 1)))
set f to "" & tmp & "MAIL" & n & ".txt"
set Usig to (ASCII character 254) & (ASCII character 255)
set {Ocode, Ucode} to {"unicode-2-0-utf-7", "unicode-2-0"}
tell app "Mail"
selection
set msg to item 1 of result
set s to msg's content as string
end
open for access file f with write permission
write s to file f
close access file f
set s to read file f
set s to TECConvertText s fromCode Ocode toCode Ucode
open for access file f with write permission
set eof file f to 0
write Usig to file f
write s to file f
close access file f
tell app "Finder"
open file f using application file id "com.apple.textedit"
end
tell app "TextEdit" to activate

(* JD
Sent with Eudora -- of course *)
_______________________________________________
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: Mail UTF-7 Script -- final
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Search a file question - Mac OS 9
  • Next by Date: Re: FMP 6.0v3, OS X 10.2 and AppleScript -> Broken
  • Previous by thread: Re: Retrospect and ASIP
  • Next by thread: Re: Mail UTF-7 Script -- final
  • Index(es):
    • Date
    • Thread