Re: writing text to MS Word
Re: writing text to MS Word
- Subject: Re: writing text to MS Word
- From: Hudson Barton <email@hidden>
- Date: Wed, 1 Jun 2005 16:56:15 -0400
The result of the shell script was not unicode after all. Although it
was supposed to contain nothing but hex characters and line feeds,
there is something else in there. My script saying "set res to
result as string" did nothing (because it was already a string).
I still don't know why, but the Arthur Knapp AsPlainText routine works great.
set {text:plainText} to textual as text
return plainText
Thank you for your help.
H.
At 11:48 AM -0700 6/1/05, Paul Berkowitz wrote:
But Word X does not require ASCII text. Word X uses the very same Mac
"International Text" that 'string' means to AppleScript, and that you get
when you coerce Unicode to string. There are thousands of characters you can
type in Word X that are not ASCII. That's no way to being Unicode (which is
what Word 2004 can do) - but anything that's returned by 'as string' from
Unicode in AppleScript will go into Word X. If it happens to contain a
genuine Unicode character that has no 'international text' equivalent or
pseudo-equivalent, you'd just see a rectangle in Word. That will never
happen with standard MacRoman characters, nor with Cyrillic nor about 15,000
Asian characters. If there's still a problem in Word X (as well there might
be - its AppleScript implementation is a disaster), it's got nothing to do
with this.
There _are_ places that do require ASCII, or at least MacRoman, plain text.
You can use Arthur Knapp's AsPlainText routine for those:
--
The Garnet Stone Company Ph:610-348-4371 Fax:206-339-2515
Hudson Barton email@hidden http://www.garnetstone.com
_______________________________________________
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