• 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: High performance way to encode HTML entities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: High performance way to encode HTML entities


  • Subject: Re: High performance way to encode HTML entities
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sat, 21 Oct 2006 08:50:02 -0400

I don't know if you were dreaming or not, but if you do wind up using
a do shell script solution, it looks like HTML::Entities is part of
the system perl install, so this should work:

set lf to ASCII character 10
set theText to "¡Hola!"
(do shell script "/usr/bin/perl -Mencoding=utf-8 -MHTML::Entities -lne
'chomp; print encode_entities($_)' <<EOF" & lf & theText & lf & "EOF")
--> "&iexcl;Hola!"

--
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/mailman//archives/applescript-users

This email sent to email@hidden

References: 
 >High performance way to encode HTML entities (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: Comprehensive Applescript Reference Book (Re: Applescript equivalent of $0 in shell script)
  • Next by Date: Re: Why is it?
  • Previous by thread: High performance way to encode HTML entities
  • Next by thread: Re: High performance way to encode HTML entities
  • Index(es):
    • Date
    • Thread