Re: Rép: Unicode versus Utf8
Re: Rép: Unicode versus Utf8
- Subject: Re: Rép: Unicode versus Utf8
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 6 Jul 2009 07:26:43 -0400
On Mon, Jul 6, 2009 at 4:16 AM, Yvan KOENIG<email@hidden> wrote:
> Is it a way to code:
> set sourceStr to "Pages ’06"
> set mystr to (do shell script "some incantations" & sourceStr
To get the original, unencoded string back:
set sourceStr to "Pages ’06"
set mystr to (do shell script "perl -Mencoding=utf8 -MHTML::Entities
-lne 'print decode_entities($_)' <<<" & quoted form of sourceStr)
To go straight from the entity form to the URI form:
set sourceStr to "Pages ’06"
set mystr to (do shell script "perl -Mencoding=utf8 -MHTML::Entities
-MURI::Escape=uri_escape_utf8 -lne 'print
uri_escape_utf8(decode_entities($_))' <<<" & quoted form of sourceStr)
--
Mark J. Reed <email@hidden>
_______________________________________________
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