[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Ampersand for URLs

Subject: RE: Ampersand for URLs
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Tue, 24 Apr 2001 09:18:55 +0100
escaping ampersand in urls
Mike Brown wrote:
> *sigh* Why is this so hard for people to grasp?

Answer: because the specs are such a mess: no-one would have ever designed
it this way, it just grew.

> You can also use %, but only to indicate the beginning of an escape
> sequence of the form %XX where XX are 2 characters that form a
> hexadecimal number from 00 to, theoretically, FF, although
> the meaning of
> anything above 7F (the upper limit of ASCII) is questionable.

The meaning of characters above 7F is very clear, I think. If you want to
use non-ASCII characters in a URI, for example if you have a query parameter
whose value is the name of a person who doesn't happen to have a good old
English name like Brown or Kay, then the spec says that you must encode the
non-ASCII characters in UTF-8 and encode each of the resulting bytes in the
form %HH. This will ALWAYS give you bytes in the range 80 to FF.

("The spec" here is the HTML spec: as far as I'm aware this escaping scheme
is defined only for use in HTML, though I gather it's likely to become an
Internet RFC in due course).
>
> The reason you would want to use a %XX escape sequence is so you can
>   (1) represent a reserved character being used for something other than
>     its reserved purpose
>   (2) represent the other ASCII characters that exist but that
> are disallowed
>     in URIs, like %20 for the space character, %22 for the
> double quote, etc.

add (3): represent a non-ASCII character in a URI.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.