Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web server with my ISP which replaces accented characters in URLs with their unicode values: for instance é (eacute) is translated to %e9 (dec 233).

For testing locally I use EasyPHP which translates those characters by their utf-8 equivalence: é is then replaced by the well known sequence %c3%a9 (é)...
Browsers served by EasyPHP don't decode unicode values but they do if running locally (utf-8 and non converted accent also)...

I have been unable to find where this behavior is configured in the server.

This is a problem as some urls are built by my application using the php rawurlencode() which seems to always encode with unicode values on both servers.
Any idea?

share|improve this question
UTF-8 is a Unicode encoding. The first encoding is most-likely ISO-8859-1 or some similar encoding, like Windows-1252. – Lèse majesté Mar 13 '13 at 7:53

There is multiple ways to set character encoding.

  1. php.ini - default_charset = "utf-8"
  2. php header - header('Content-Type:text/html; charset=UTF-8');
  3. html meta - <meta http-equiv="Content-type" value="text/html; charset=UTF-8" />
  4. .htaccess - AddCharset UTF-8 .html

For more on the subject check out UTF-8: The Secret of Character Encoding or PHP UTF-8 cheatsheet and mbstring runtime configuration

share|improve this answer
already run arouund all these (1 to 4), will concentrate on the mbstring items. Thanks – jjjm1937 Dec 13 '12 at 10:26

To change the default character encoding, you need to edit your Apache configurations (httpd.conf):

AddDefaultCharset utf-8
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.