ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Rogers, Michael K" <mroge02@emory.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Encoding reserved characters in URI query strings
Date: Sun, 5 Feb 2017 14:06:21 +0000	[thread overview]
Message-ID: <E255428E-072A-4691-B8D2-A5A68505B392@emory.edu> (raw)

Let's say I want a link to plot x+2 in Wolfram|Alpha.  I need to catenate "http://www.wolframalpha.com/input/?i=" and  "plot+x%2B2".  Is there any way already available in ConTeXt to translate reserved characters like "+" to the percent-hexcode "%2B"?

Something like

    \encode[plot x+2]

would become

    plot+x%2B2

Or more generally, some languages have a query constructor like this

    \queryURI
      [http://www.wolframalpha.com/input]
      [i=plot x+2]

which would construct the URI

    http://www.wolframalpha.com/input/?i=plot+x%2B2

I could write my own, of course.  But no need to reinvent the wheel.

TIA,

Michael

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2017-02-05 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-05 14:06 Rogers, Michael K [this message]
2017-02-05 17:09 ` Aditya Mahajan
2017-02-05 17:22   ` Rogers, Michael K
2017-02-07 12:24   ` Bibliography Jean-Pierre Delange
2017-02-07 15:12     ` Bibliography Alan Braslau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E255428E-072A-4691-B8D2-A5A68505B392@emory.edu \
    --to=mroge02@emory.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).