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: Sun, 5 Jul 2009 17:22:30 -0400
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 (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden