PHP Classes

apostrophes & accents

Recommend this page to a friend!

      PHP Slugify  >  All threads  >  apostrophes & accents  >  (Un) Subscribe thread alerts  
Subject:apostrophes & accents
Summary:keeping apostrophes & accents in URLs
Messages:3
Author:numanuma
Date:2021-06-01 17:12:54
 

  1. apostrophes & accents   Reply   Report abuse  
Picture of numanuma numanuma - 2021-06-01 17:12:54
Hello, thanks a lot for this package.

I see you keep apostrophes & accents. If I use Slugify for making URLs, is this nowadays ok in terms of SEO and browser compatibility?

Thanks,
Manuel


  2. Re: apostrophes & accents   Reply   Report abuse  
Picture of Moamen Eltouny Moamen Eltouny - 2021-06-02 16:39:58 - In reply to message 1 from numanuma
Hello,

I really appreciate that and i hope i can do more.
Yes it's compatible with SEO and browsers.

The new browsers and most of Search Engines nowadays can handling the apostrophes & accents because they are encoding it automatically.

But if you want to encode it so you can use urlencode function.

Thanks,
Moamen

  3. Re: apostrophes & accents   Reply   Report abuse  
Picture of numanuma numanuma - 2021-06-04 08:18:26 - In reply to message 2 from Moamen Eltouny
Thanks for the reply.

Using urlencode makes URLs unreadable (for the user), unspellable.

And also I noticed this : after copying an URL (with accents) from the address bar of the browser, when you paste it somewhere in plain text it keeps the encoded version. Example:

Frédéric Chopin's Wiki page is located at:
fr.wikipedia.org/wiki/Frédéric_Chop ...

But when you copy/paste it from the address bar (to your prefered social media), the result is:
fr.wikipedia.org/wiki/Fr%C3%A9d%C3% ...

I know this is not related to your package. It probably is a browser output. But it's annoying, because keeping accents in the URL is therefore only for the eyes.

Then I still wonder if I have to keep or not the accents & apostrophes on my website (which is in french btw).

Anyway, thanks again for your package, I really appreciate it.