Is utf-8/unicode used by most of the clients ? And if not, should i care, the user could change the charset in the browser settings / or update the software ?
I am working with MySQL and PHP (and others), my db and my tables use unicode, because it will contain usernames and texts in different languages.
In php I work with : -multibyte string functions -regexp (u modifier and unicode letters \p{L}) -an is_string_utf8 function, so everything else will be rejected
The u-modifer wants valid utf-8, so the input has to be utf-8 (or not ?)
I also use prepared statements, that and my is_string_utf8 function are supposed to prevent multi-byte attacks.
Does it work ? -Yes.
But if the user has another charset than unicode in his browser, it won't work properly, is_string_utf8 will reject most of the sended information.
So, my questions : Should i care about ISO and the other charsets ? Isn't utf-8 the standard by now ? Could i use mb_convert_encoding or is it more complicated than that, converting all charsets into utf-8 ? Is converting the charset still secure ?
Thank you very much in advance.