I saw there are different discussion on this subject and I did find some solutions, but I still can't fix the accent problem.
I have a text in Italian, we have some letters with accents (à
, è
, é
, ì
, ò
and ù
), this text gets sent in a file over to another website and this has to be in ASCII
format, this is what I'm currently doing:
$res_to_write = "Non c'è più l'oblò, è lì o là?" //DEMO TEXT
$resfile = iconv("UTF-8", "US-ASCII//TRANSLIT", $res_to_write);
The result is in ASCII, which is good but it gets converted to:
Non c'e piu l'oblo, e li o la?
Which is completely wrong in Italian.
Do I have to make a replace of every accent like è
=> e'
(single quote) so at least looks ok or there is another solution to this?