3

When I am searching a gem in rubygems, I notice that the url is:

https://rubygems.org/search?utf8=✓&query=jekyll-multiple-languages

I want to know what is the purpose of using instead of any other characters.

Any explanation is welcome. :)

srain
  • 8,944
  • 6
  • 30
  • 42
  • 1
    *probably* it's to detect if something's mangling the URLs somewhere along the way - if something doesn't actually support UTF-8 in the URLs, it'll come through to the server as some other (set of) character(s). But the only people who could answer this for sure would be the developers behind the site. – Damien_The_Unbeliever Oct 09 '14 at 07:54
  • 1 plus point is more readability – divyenduz Oct 09 '14 at 07:58
  • You want to know why rubygems.org uses it? Or what’s the meaning of this character in URLs, no matter who uses them? – unor Oct 11 '14 at 19:45
  • @unor, I want to know as more as possible about this. :) – srain Oct 12 '14 at 01:13
  • probably because it looks cool – mukunda Dec 07 '14 at 03:56

1 Answers1

0

The URI standard doesn’t define a specific meaning for it (i.e., it’s not a reserved character), so it just represents (user-defined) data.

Why is rubygems.org using it? Only they can know for sure, but a likely reason could be the following:

According to Gareth’s answer on Programmers SE, Internet Explorer 8 (and older versions) "will submit form data in Latin-1 encoding if possible". As cannot be encoded in Latin-1, IE uses UTF-8 for submitting the form data.

So if that’s the reason, any non-ASCII character would probably do the job, but choosing a checkmark makes sense in that context.
For the same purpose, Ruby on Rails used instead (see What is the _snowman param in Ruby on Rails 3 forms for?).

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • It's not a valid URL character; see https://stackoverflow.com/questions/1547899/which-characters-make-a-url-invalid – Robert Dec 07 '14 at 04:03
  • @Robert: Like any non-ASCII character, you’d have to percent-encode it in URIs, i.e. `%E2%9C%93`. – unor Dec 07 '14 at 04:05
  • @StephanBijzitter: And why is that? – unor Nov 04 '15 at 10:10
  • Your third paragraph contradicts your first – Stephan Bijzitter Nov 04 '15 at 10:13
  • @StephanBijzitter: I don’t see why. The first paragraph says that it’s not a reserved character (i.e., the URI standard doesn’t define any meaning for it, like it does for `/`, `#` etc.). The third paragraph is speculation why the website in question might use this character; the point is that it doesn’t matter which character gets used, as long as it has to be percent-encoded. – unor Nov 04 '15 at 10:16
  • As indicated it will force the encoding to UTF-8, and that is definitely a meaning. Now you might say the the checkmark itself has no meaning, but the UTF-8 character like a checkmark does. – Stephan Bijzitter Nov 04 '15 at 11:17
  • @StephanBijzitter: You seem to have ignored the word "reserved" in the term *reserved meaning*. Every character in an URI has a meaning, or a purpose, (e.g., the `o` in `http://example.com/foo`), otherwise it wouldn’t be there. But not every character has a meaning given by the URI spec (i.e., not every character is *reserved*), e.g., the `o` in that URI is not a reserved character, just like the `✓` isn’t one, so the URI spec doesn’t define their meanings. – unor Nov 04 '15 at 17:09
  • You make a good point, sadly I cannot reverse my downvote until you edit your answer. Maybe you could clear this up a bit more (for people like me) and tag me again and I'll undo the damage ;-) – Stephan Bijzitter Nov 04 '15 at 17:25
  • @StephanBijzitter: I tried to rephrase it -- thank you :) – unor Nov 04 '15 at 21:18