Re: percent encoding handler
Re: percent encoding handler
- Subject: Re: percent encoding handler
- From: Shane Stanley <email@hidden>
- Date: Mon, 11 Jul 2016 09:44:53 +1000
On 11 Jul 2016, at 12:39 AM, Jim Underwood <email@hidden> wrote:
>
> Is it designed for URL encoding, or something else?
Yes, but that's not a one-size-fits-all problem. What constitutes "allowed characters" depends on which part of a URL you're talking about. So in this case URLQueryAllowedCharacterSet() means the characters allowed in a URL query, which is defined as the characters immediately following a question mark. I used that because I guessed what Phil was after.
If you wanted to encode the host URL, you would use URLHostAllowedCharacterSet() instead. And there are different sets for user names, passwords, paths, and fragments.
So you can't just take anything other than a very simple URL and encode it reliably in one pass.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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