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

  • Prev by Date: Re: Rép: Unicode versus Utf8
  • Next by Date: Strange Font Pasted in Mail
  • Previous by thread: Fwd: Rép: Unicode versus Utf8
  • Next by thread: Re: Rép: Unicode versus Utf8
  • Index(es):
    • Date
    • Thread