Re: do shell script "perl... " to find/replace in a string
Re: do shell script "perl... " to find/replace in a string
- Subject: Re: do shell script "perl... " to find/replace in a string
- From: Joseph Weaks <email@hidden>
- Date: Wed, 17 Mar 2004 11:49:46 -0600
Excellent,
One follup:
On Mar 17, 2004, at 11:15 AM, Gnarlodious wrote:
Secondly, is it possible to pass a unicode hex number as the
replaceString?
There's a UNIX shell command for this,
try -- iconv first
do shell script "iconv -f macintosh -t utf-8
sourcefile>targetfile"
on error -- maybe piconv is available?
do shell script "piconv -f MacRoman -t utf-8
sourcefile>targetfile"
end try
So, not sure how to incorporate this into a do shell script command
that takes
set sampleText to "Blaah Blah Blaah"
set findString to "aa"
set replaceString to -- Unicode hex U+00C6 or Unicode Decimal 198
and does the replacement.
Also, what if the replaceString should be two combined unicode
characters (as in a letter and a combining diacritical)?
Thanks,
Joe
_______________________________________________
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.