utf 8 - utf8_decode(): Same strings in UTF-8 returns different result (PHP)

937

I have two strings that look absolutely the same in UTF-8.

$string1 = "histórico";
$string2 = "histórico";

but when I convert them to ISO-8859-1, (it doesn´t mind if I useutf8_decode,iconv ormb_convert_encoding) I get different output for them:

  • The string1 converts to histoÌrico
  • The string2 converts to histórico (that is, in fact what I expected for both strings)

Any idea?

Thanks in advance!

People are also looking for solutions to the problem: php pdo code to search and echo from textbox

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.