• 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: Encode URLs for posting help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Encode URLs for posting help


  • Subject: Re: Encode URLs for posting help
  • From: has <email@hidden>
  • Date: Thu, 31 Mar 2005 13:01:21 +0100

Neil Lee wrote:

This worked, and is much, much faster and CPU friendly. The issue,
though, is that if any of the track's info has a single or double quote
in it, the script errors out.

This'll work:

on encodeURL(str)
return do shell script ("python -c \"import sys, urllib; print urllib.quote(sys.argv[1]) \" " as Unicode text) & quoted form of str
end encodeURL



Christopher Biagini wrote:

Here's my personal favorite, from
<http://www.apple.com/applescript/scripteditor/12.html>.

Don't use that, it's rubbish code and will screw up all non-ASCII characters.

has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Encode URLs for posting help
      • From: "Shane Stanley" <email@hidden>
  • Prev by Date: Re: Encode URLs for posting help
  • Next by Date: Re: Capturing username for script that mounts server
  • Previous by thread: Re: Encode URLs for posting help
  • Next by thread: Re: Encode URLs for posting help
  • Index(es):
    • Date
    • Thread