Re: how to convert *space* to
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