charset issues in printing text from db table
问题 I have a database defined with charset utf8_general_ci and a table that should store some text inserted from a text area form with the same charset. The form I use to get the text is this: <form action="submit_text.php" method="post"> Text:</br> <textarea name="text" cols="109" rows="20"> <?php echohtmlspecialchars($_POST['text']);?> </textarea> <input name="submit" type="submit" value="save text"> </form> The php instructions I use to save this text in my database are the following: $text =