Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Convert Entourage text encodings via AppleScript Apps
While it is great that Entourage 2004 has Unicode support, it is unfortunate that it does not support certain other character sets. For my mom, the lack of support for Windows/DOS Thai encoding is somewhat inconvenient, since that encoding is still the main one used in Thailand. Instead of letting her use Outlook Web Access in Safari (which does support Windows/DOS Thai), I decided to try my hand at Applescript [view source].

The AppleScript uses a program called Cyclone to convert the source of a selected message in Entourage from Windows/DOS Thai to Unicode. It then creates a new note containing the converted message source, and links the note to the original message. I initially wrote the script so that it would overwrite the subject and content of the message with the converted text, but found this method to be destructive and unreliable (certain characters did not convert properly, for some reason).

Obviously, the script requires that Cyclone be installed. Also, the script should be placed in ~/Documents -> Microsoft User Data -> Entourage Script Menu Items, so that it will show up in the Script Menu within Entourage.

Something I discovered by accident (I don't think it's documented anywhere) is if you end the name of the script file with 'c' and some letter (mine is called "Convert Message from DOS Thai to UnicodecC"), you will be able to use Control-letter as a shortcut for the script in Entourage (in my case, Control-C). And of course, the script can be edited for conversion of other text encodings.

This hint is probably of use to only a small number of people, but I thought I'd submit it anyway, in case anyone has ideas about improvements or a better way to accomplish this task.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[5,806 views]  

Convert Entourage text encodings via AppleScript | 3 comments | Create New Account
Click here to return to the 'Convert Entourage text encodings via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Entourge text encodings... an update
Authored by: loyrirk on Jan 11, '05 11:10:08AM

Well... I have, since submitting this hint last week, discovered that Entourage 2004 DOES support the windows-874 Thai character set--it's just not obvious since it's not listed as an option under the Format:Character Set menu item. By examining the headers of some emails from Thailand that showed up properly in Entourage, I discovered they were encoded in windows-874 and not in Unicode as I had assumed.

It turns out that the problem with the other emails was merely that their headers did not label them as windows-874. So below is the code for a shorter and much simpler Applescript that I used to rectify the problem. A much more elegant solution, I think...


(*
	Change Character Set to DOS Thai
	
	Sets the character set of the selected message(s) to "windows-874" (Windows/DOS Thai), 
	rendering Thai messages with incorrect headers readable in Entourage.
*)

tell application "Microsoft Entourage"
	-- get the currently selected message or messages
	set selectedMessages to current messages
	-- if there are no messages selected, warn the user and then quit
	if selectedMessages is {} then
		display dialog "Please select a message first and then run this script." with icon 1
		return
	end if
	repeat with theMessage in selectedMessages
		set character set of theMessage to "windows-874"
	end repeat
end tell
Now, if I could figure out a way to convert outgoing Thai emails from Entourage's default Unicode encoding to windows-874 so that people in Thailand were sure to be able to read it... my mom would be set.

[ Reply to This | # ]
Entourge text encodings... an update
Authored by: cchristner on Jan 11, '05 12:04:46PM

Seems a bit complicated, try this (iTunes Ratings column must be visible):

1. Click Rating column header to sort on ratings

2. Select desired songs (all 4 star ratings, for example)

3. File > Get Info

4. Click 3 stars, then OK

You're done!



[ Reply to This | # ]
Correction about naming scripts for shortcuts
Authored by: loyrirk on Jan 11, '05 11:21:58AM

I forgot that backslashes are lost in posts--my original post should say:

[quote]
... if you end the name of the script file with '\c' and some letter (mine is called "Convert Message from DOS Thai to Unicode\cC"), you will be able to use Control-letter as a shortcut for the script in Entourage (in my case, Control-C).
[/quote]

[ Reply to This | # ]