• 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: how to convert *space* to
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to convert *space* to


  • Subject: Re: how to convert *space* to
  • From: Wayne Melrose <email@hidden>
  • Date: Wed, 18 Nov 2009 10:05:05 +0100


On 18. nov. 2009, at 05.24, Richard Rönnbäck wrote:

As it happens, I wrote a small handler to do that just the other day. I isn't thoroughly tested and you may want to keep an eye on the result for non-English characters, as all sort of things may happen with different Unicode flavors.

Having that said, I think it will work just fine if you are looking to URL encode a string:


display dialog urlEncode("here is some sample text")


on urlEncode(myString)
    
set myQutedURL to quoted form of myString
   
set myCmd to "php -r \"echo rawurlencode(" & myQutedURL & ");\""
    
set myResult to do shell script myCmd
   
return myResult
end urlEncode


This is using php, but does that mean this would work on all OSX versions previous to snow leopard? 

Nice clean function though :) 

 _______________________________________________
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: how to convert *space* to
      • From: Richard Rönnbäck <email@hidden>
References: 
 >Re: how to convert *space* to (From: Richard Rönnbäck <email@hidden>)

  • Prev by Date: Re: how to convert *space* to
  • Next by Date: Apple Script For Opening External EML File With Apple Mail
  • Previous by thread: Re: how to convert *space* to
  • Next by thread: Re: how to convert *space* to
  • Index(es):
    • Date
    • Thread