Author Topic: Special symbols in URLs.  (Read 3553 times)

gm66

  • Inner Core
  • Hero Member
  • *
  • Posts: 1472
    • View Profile
Special symbols in URLs.
« on: April 03, 2017, 10:14:01 AM »
A new client uses the TM symbol (registered trademark) in some of their URLs.

I'd assume G can cope with this but would like to make sure, if anyone has had to deal with this before is it a problem?


Cheers, G.
Civilisation is a race between disaster and education ...

Rupert

  • Inner Core
  • Hero Member
  • *
  • Posts: 3357
  • George in a previous life.
    • View Profile
    • SuitsMen
Re: Special symbols in URLs.
« Reply #1 on: April 03, 2017, 01:18:59 PM »
No idea, but are the pages cached by Google?
... Make sure you live before you die.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9320
    • View Profile
Re: Special symbols in URLs.
« Reply #2 on: April 03, 2017, 04:29:58 PM »
Shoot... wrote a reply and then closed the tab without posting. No back button for that.

So anyway, this seems like a terrible idea.

I've had my eye on these issues for almost 15 years now
https://www.webmasterworld.com/forum88/2256.htm
https://www.webmasterworld.com/forum88/3543.htm

We've come a looonnng way in the interim, but I still see related issues.

Mixing character encodings break things. Technically, if you are using an extended character set, it's not a URL or a URI, it's an IRI (Internationalized Resource Identifier). That might help searching for info, but the RFC is here http://www.ietf.org/rfc/rfc3987.txt

Among other things, it states: "For example, should one IRI be  stored in a byte array in UTF-8 encoding form and the second in a  UTF-16 encoding form, bit-for-bit comparisons applied naively will produce errors."

And just in general, are sure you will always be using UTF-8? Or UTF-8 BOM? Or UTF-16? Or Win-1252 which is " used by default in the legacy components of Microsoft Windows in English" (https://en.wikipedia.org/wiki/Windows-1252)? Are you sure that the web surfer will not be using any of those legacy Windows components? Because if he is and pastes your URL into an email and sends it, it will break?

Are you sure that your encoding in your headers will match the declaration on the page? Because if they are not the same, your URLs might break.

Also, what shows in your browser bar may not match the URL if you are using percent encoding as some browsers render it and others do not
http://stackoverflow.com/questions/29988255/browser-support-for-utf8-encoded-characters-in-urls

Is the server set to use double-byte encoding? That might affect things too.
https://www.ibm.com/support/knowledgecenter/ko/SSELE6_8.0.0.4/com.ibm.isam.doc_8.0.0.4/wrp_config/concept/con_utf8_sup_url.html

And if you do end up percent encoding, you have to make sure all urls are encoded/decoded (which you should be doing anyway) and take that into account for cutting and pasting and so forth.

Your best case with percent encoding is that the URL is http://example.com/super-product%E2%84%A2

This seems like a path to pain for no good reason except vanity. The client is so proud of their trademark, they even want it in their URL, just like Ford and Microsoft and Tesla and Apple do with their URLs. Oh wait, reality check, NONE of them do that with their URLs. Is it because they don't have the resources to do so?

JasonD

  • Inner Core
  • Hero Member
  • *
  • Posts: 1420
  • Look at THAT!!!!
    • AOL Instant Messenger - JasonDDuke
    • View Profile
    • Domain Names
    • Email
Re: Special symbols in URLs.
« Reply #3 on: April 03, 2017, 05:14:27 PM »
Quote
This seems like a path to pain for no good reason except vanity. The client is so proud of their trademark, they even want it in their URL, just like Ford and Microsoft and Tesla and Apple do with their URLs. Oh wait, reality check, NONE of them do that with their URLs. Is it because they don't have the resources to do so?

I was going to write a long post but ergophobe said it better than me. The above quote sums it up.... don't do it!

Rupert

  • Inner Core
  • Hero Member
  • *
  • Posts: 3357
  • George in a previous life.
    • View Profile
    • SuitsMen
Re: Special symbols in URLs.
« Reply #4 on: April 03, 2017, 05:58:33 PM »
 ;D
... Make sure you live before you die.

gm66

  • Inner Core
  • Hero Member
  • *
  • Posts: 1472
    • View Profile
Re: Special symbols in URLs.
« Reply #5 on: April 04, 2017, 08:24:39 AM »
Damn ergo, sometimes i wish you knew less, you make me read so much ;+}

Thanks for replies :)
Civilisation is a race between disaster and education ...

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9320
    • View Profile
Re: Special symbols in URLs.
« Reply #6 on: April 04, 2017, 03:37:11 PM »
Damn ergo, sometimes i wish you knew less, you make me read so much ;+}

Ha ha! I always feel like that around here. Like the little kid who got invited to the big kids' party. This place makes your smarter, that's for sure.

Rumbas

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2106
  • Viking Wrath
    • MSN Messenger - rasmussoerensen@hotmail.com
    • AOL Instant Messenger - seorasmus
    • View Profile
Re: Special symbols in URLs.
« Reply #7 on: April 05, 2017, 01:53:17 PM »
>So anyway, this seems like a terrible idea.

It's a horrible idea for soo many reasons. Dealing with this on a daily basis and it ALWAYS screws things up.. Eg. DON'T DO IT!

A-z, 0-9 - that's it.