Page 1 of 1

urlencode with two different falvors?

Posted: Mon Dec 11, 2006 12:45 pm
by pedrotuga
this is strange.

URL encode codes

Code: Select all

รก
as

Code: Select all

%E1
but, on google, wikipedia and others it's being coded as:

Code: Select all

%C3%A1

i want to use this second kind of encoding and i can't :(

can anybody tell me why?
and how can i do it?

Posted: Mon Dec 11, 2006 12:47 pm
by feyd
It's UTF-8 encoding.

Posted: Mon Dec 11, 2006 12:51 pm
by pedrotuga
feyd wrote:It's UTF-8 encoding.
Ok... so which function should i use instead of urlencode() ?

aparently is still encoding all those chars the old way.

Posted: Mon Dec 11, 2006 2:39 pm
by John Cartwright
http://www.php.net/utf8_encode might be of interest

Posted: Mon Dec 11, 2006 4:10 pm
by pedrotuga
thank you mates, problem solved.