, , , UTF-8 . , - UTF-8 UTF-8, UTF-8, ( ) UTF-8, , . html-, , :
<form action="/index.php" method="post" accept-charset="UTF-8"></form>
If the detection of user input encoding is not the whole goal of your application, this must be done with an error. Suppose the encoding is incorrect and convert it to UTF-8 in your application. Just as you should assume that your user input is malicious and will clear it before trying to insert it into your database.
In most languages that use UTF-8 correctly, ASCII characters will survive the conversion, so don't worry about that.
user187702
source
share