• 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: percent encoding handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >percent encoding handler (From: 2551phil <email@hidden>)
 >Re: percent encoding handler (From: Shane Stanley <email@hidden>)
 >Re: percent encoding handler (From: Jim Underwood <email@hidden>)

  • Prev by Date: Re: percent encoding handler
  • Next by Date: Re: Scripting the Notes app
  • Previous by thread: Re: percent encoding handler
  • Next by thread: Re: Scripting the Notes app
  • Index(es):
    • Date
    • Thread