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!
Answer
Solution:
There are two ways of creating the character
:
{-code-2}
o
, followed by the combining accent mark´
:U+006F U+0301
After rendering, they look identical.