URL encoding of c cedille

B

Bone Ur

Well bust mah britches and call me cheeky, on Sun, 16 Dec 2007 21:49:50 GMT
Roedy Green scribed:
<a href="http://en.wikipedia.org/wiki/Façade_pattern">

How can you encode that URL to avoid the c cedille?

Why do you have to avoid it?
Are you supposed to use &ccedil; or some hex coding?

Either one. On my box, I can insert the letter directly (cut-and-paste,
that is.)

Jukka may be along to explain it in more Circean terms, although his timing
is undependable.
 
B

Ben C

<a href="http://en.wikipedia.org/wiki/Façade_pattern">

How can you encode that URL to avoid the c cedille?

I think properly as http://en.wikipedia.org/wiki/Façade_pattern.

That is to say, you turn the c cedille into the UTF-8 sequence 0xC3 0xA7
and then percent-encode that.

But http://en.wikipedia.org/wiki/Fa%E7ade_pattern also seems to work
(i.e. you represent the c cedille in ISO-8859-1, and then percent-encode
that).

I'm wondering if there's an older document or standard somewhere that
short-sightedly recommended ISO-8859-1 for urls. I'm hoping someone more
knowledgeable will be able to clarify this.
 
B

Ben C

Well bust mah britches and call me cheeky, on Sun, 16 Dec 2007 21:49:50 GMT
Roedy Green scribed:


Why do you have to avoid it?


Either one. On my box, I can insert the letter directly (cut-and-paste,
that is.)

&ccedil; won't work if actually typed into the browser's location bar,
but if you put it in an href attribute, I guess the browser decides how
best to encode and percent-escape it before actually making the HTTP
request.
Jukka may be along to explain it in more Circean terms, although his timing
is undependable.

I'm hoping to spur him into action by contributing some clueless remarks
on the subject :)
 
J

Jukka K. Korpela

Scripsit Ben C:
I'm wondering if there's an older document or standard somewhere that
short-sightedly recommended ISO-8859-1 for urls.

No, it was just common practice (which still often works).
 
B

Ben C

Scripsit Ben C:


No, it was just common practice (which still often works).

It looks like Wikipedia sends a 301 redirection to the proper UTF-8
version of the url:

$ curl -v http://en.wikipedia.org/wiki/Fa%E7ade_pattern
* About to connect() to en.wikipedia.org port 80
* Trying 91.198.174.2... connected
* Connected to en.wikipedia.org (91.198.174.2) port 80
> GET /wiki/Fa%E7ade_pattern HTTP/1.1
> User-Agent: curl/7.14.0 (i686-suse-linux) libcurl/7.14.0
> OpenSSL/0.9.7g zlib/1.2.3
> Host: en.wikipedia.org
> Accept: */*
>
< HTTP/1.0 301 Moved Permanently
< Date: Sun, 16 Dec 2007 23:08:34 GMT
< Server: Apache
< X-Powered-By: PHP/5.1.2
< Vary: Accept-Encoding,Cookie
< Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
< Last-Modified: Sun, 16 Dec 2007 23:08:34 GMT
< Location: http://en.wikipedia.org/wiki/Façade_pattern
 
B

Bone Ur

Well bust mah britches and call me cheeky, on Sun, 16 Dec 2007 22:58:49
GMT Ben C scribed:
&ccedil; won't work if actually typed into the browser's location bar,
but if you put it in an href attribute, I guess the browser decides
how best to encode and percent-escape it before actually making the
HTTP request.

Naturellment (-pardon my French). You'd have to type-in the percent sign
and hex value 'cause that's how the url is read.
I'm hoping to spur him into action by contributing some clueless
remarks on the subject :)

Hehe, uh, yes, I'm familiar with the technique...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top