I'm just trying to confirm something htmlspecialchars . I just converted my database to UTF-8 and I think that finally it all works, but in all my code I used PHP htmlspecialchars :
htmlspecialchars($val, ENT_QUOTES,'ISO-8859-1',false);
I need to worry about changing all entries:
htmlspecialchars($val, ENT_QUOTES,'UTF-8',false);
The PHP documentation assumes I don't need this, but is that true?
For the purpose of this function, the encodings ISO-8859-1, ISO-8859-15, UTF-8, cp866, cp1251, cp1252 and KOI8-R are practically equivalent, since the characters affected by htmlspecialchars () occupy the same positions in all of these encodings.
source share