Re: Rép: Unicode versus Utf8
Re: Rép: Unicode versus Utf8
- Subject: Re: Rép: Unicode versus Utf8
- From: Yvan KOENIG <email@hidden>
- Date: Mon, 6 Jul 2009 10:23:05 +0200
Le 5 juil. 2009 à 21:37, Mark J. Reed a écrit :
Of course there is. Just pass the whole string in to either the Perl
or Tcl solution.
The only potentially tricky thing is the quoting, so I would feed the
string in as stdin instead of in the code. Try this:
do shell script "perl -MURI::Escape=uri_escape_utf8 -lne 'print
uri_escape_utf8($_)' <<<" & (quoted form of someString)
Thanks but if I apply it:
set myString to "Pages ’06"
do shell script "perl -MURI::Escape=uri_escape_utf8 -lne 'print
uri_escape_utf8($_)' <<<" & (quoted form of myString)
I get:
"Pages ’06"
which is not the wanted result.
Emmanuel response is correct but as the script is not for my own use
but for a user which don't want to install third party tools I can't
use it.
In fact I was hoping tfor a shell code like that:
set sourceStr to "Pages ’06"
set mystr to (do shell script "some incantations" & sourceStr
setting mystr to"Pages ’06"
so that I would be able to call:
set escaped to (do shell script "perl -Mencoding=utf8 -
MURI::Escape=uri_escape_utf8 -lne 'print uri_escape_utf8($_)' <<<" &
quoted form of mystr)
Yvan KOENIG (from FRANCE lundi 6 juillet 2009 10:00:17)
_______________________________________________
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