• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rép: Unicode versus Utf8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 &#x2019;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 &#x2019;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 &#x2019;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
  • Follow-Ups:
    • Re: Rép: Unicode versus Utf8
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Rép: Unicode versus Utf8 (From: Yvan KOENIG <email@hidden>)
 >Re: Rép: Unicode versus Utf8 (From: Philip Aker <email@hidden>)
 >Re: Rép: Unicode versus Utf8 (From: Philip Aker <email@hidden>)
 >Re: Rép: Unicode versus Utf8 (From: Emmanuel LEVY <email@hidden>)
 >Re: Rép: Unicode versus Utf8 (From: "Mark J. Reed" <email@hidden>)
 >Re: Rép: Unicode versus Utf8 (From: Axel Luttgens <email@hidden>)
 >Re: Rép: Unicode versus Utf8 (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Editing Incoming Messages in Mail
  • Next by Date: Re: Rép: Unicode versus Utf8
  • Previous by thread: Re: Rép: Unicode versus Utf8
  • Next by thread: Re: Rép: Unicode versus Utf8
  • Index(es):
    • Date
    • Thread