Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is ë percent encoded to %EB but also to %C3%AB?

When I enter ë into a form on my web application, this is percent encoded by Google Chrome to %C3%AB.

When I use PHP's urlencode('ë'); This is encoded into %EB.

Why are the encodings different?

How can I encode with the same encoding as Google Chrome with PHP 4?

like image 656
i.amniels Avatar asked Feb 19 '23 21:02

i.amniels


1 Answers

%EB is the ISO-8859-1 form (a single character).

%C3%AB is the UTF-8 form (e + ¨).

It should work out of the box (if you use a newer version of PHP and UTF-8 for your files).

like image 190
Alix Axel Avatar answered Feb 27 '23 13:02

Alix Axel