Browser displays � instead of ´

You have to make sure the content is served with the proper character set:

Either send the content with a header that includes

<?php header("Content-Type: text/html; charset=[your charset]"); ?>

or - if the HTTP charset headers don't exist - insert a <META> element into the <head>:

<meta http-equiv="Content-Type" content="text/html; charset=[your charset]" />

Like the attribute name suggests, http-equiv is the equivalent of an HTTP response header and user agents should use them in case the corresponding HTTP headers are not set.

Like Hannes already suggested in the comments to the question, you can look at the headers returned by your webserver to see which encoding it serves. There is likely a discrepancy between the two servers. So change the [your charset] part above to that of the "working" server.

For a more elaborate explanation about the why, see Gumbo's answer.


The display of the REPLACEMENT CHARACTER (U+FFFD) most likely means that you’re specifying your output to be Unicode but your data isn’t.

In this case, if the ACUTE ACCENT ´ is for example encoded using ISO 8859-1, it’s encoded with the byte sequence 0xB4 as that’s the code point of that character in ISO 8859-1. But that byte sequence is illegal in a Unicode encoding like UTF-8. In that case the replacement character U+FFFD is shown.

So to fix this, make sure that you’re specifying the character encoding properly according to your actual one (or vice versa).