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:16:58 +0200
As the script is not for me but from a User which I try to help, the
efficient third party soluce can't be used.
Your code allow me to do that:
set mystr to "Pages ’09"
set escaped to (do shell script "perl -Mencoding=utf8 -
MURI::Escape=uri_escape_utf8 -lne 'print uri_escape_utf8($_)' <<<" &
quoted form of mystr)
Is it a way to code:
set sourceStr to "Pages ’06"
set mystr to (do shell script "some incantations" & sourceStr
Yvan KOENIG (from FRANCE lundi 6 juillet 2009 10:16:40)
Le 5 juil. 2009 à 23:22, Mark J. Reed a écrit :
Ah, I see. Encoding confusion. The Perl version below works better.
Satimage or Unicode Checker is obviously easier if you have it
installed.
set mystr to "Pages " & (character id 8217) & "09" -- can't type the
apostrophe on bberry
set escaped to (do shell script "perl -Mencoding=utf8
-MURI::Escape=uri_escape_utf8 -lne 'print uri_escape_utf8($_)' <<<" &
quoted form of mystr)
On 7/5/09, Axel Luttgens <email@hidden> wrote:
Le 5 juil. 09 à 22:49, Mark J. Reed a écrit :
’ is the correct URI-escaped UTF-8-encoded representation of
U+2019 RIGHT SINGLE QUOTATION MARK.. That's what I get back from
Perl....
Yes, an ucs-4 code of 0x2019 indeed seems to have an UTF-8
representation of 0xE28099.
But the nice thing is that Yvan came with:
<sf:bookmark sf:name="Pages ’06" sf:ranged="true"
sf:page="5">
vs
<sf:link href="#Pages ’06">
and that Emmanuel's suggestion just directly provided the latter
value. :-)
Axel
On 7/5/09, Emmanuel LEVY <email@hidden> wrote:
I get yet another result with Satimage.osax:
escapeURL (resolve entities "Pages ’06")
returns:
"Pages ’06"
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
--
Sent from my mobile device
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
@sfr.fr
Archives: http://lists.apple.com/archives/applescript-users
This email sent to 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