URL encoding of c cedille

Discussion in 'HTML' started by Roedy Green, Dec 16, 2007.

  1. Roedy Green

    Roedy Green Guest

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

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

    Are you supposed to use &ccedil; or some hex coding?


    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Dec 16, 2007
    #1
    1. Advertising

  2. Roedy Green

    Bone Ur Guest

    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.

    --
    Bone Ur
    Cavemen have formidable pheromones.
    Bone Ur, Dec 16, 2007
    #2
    1. Advertising

  3. Roedy Green

    Ben C Guest

    On 2007-12-16, Roedy Green <> wrote:
    ><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.
    Ben C, Dec 16, 2007
    #3
  4. Roedy Green

    Ben C Guest

    On 2007-12-16, Bone Ur <> wrote:
    > 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.)


    &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 :)
    Ben C, Dec 16, 2007
    #4
  5. 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).

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Dec 16, 2007
    #5
  6. Roedy Green

    Ben C Guest

    On 2007-12-16, Jukka K. Korpela <> wrote:
    > 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).


    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
    Ben C, Dec 16, 2007
    #6
  7. Roedy Green wrote:
    > <a href="http://en.wikipedia.org/wiki/Façade_pattern">
    >
    > How can you encode that URL to avoid the c cedille?
    >
    > Are you supposed to use &ccedil; or some hex coding?


    That's HMTL, not URLese.

    Quick way to find out: put the URL as above into your browser and then
    see what it's replaced by when the page is retrieved.
    Harlan Messinger, Dec 17, 2007
    #7
  8. Roedy Green

    Bone Ur Guest

    Well bust mah britches and call me cheeky, on Sun, 16 Dec 2007 22:58:49
    GMT Ben C 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.)

    >
    > &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.

    >> 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 :)


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

    --
    Bone Ur
    Cavemen have formidable pheromones.
    Bone Ur, Dec 17, 2007
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hardy Wang

    Encoding.Default and Encoding.UTF8

    Hardy Wang, Jun 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    18,803
    Jon Skeet [C# MVP]
    Jun 9, 2004
  2. Jon paugh
    Replies:
    1
    Views:
    686
  3. Replies:
    1
    Views:
    23,318
    Real Gagnon
    Oct 8, 2004
  4. Just D.
    Replies:
    0
    Views:
    404
    Just D.
    Aug 11, 2004
  5. Replies:
    2
    Views:
    354
Loading...

Share This Page