lynx72 Posted January 21, 2017 Share Posted January 21, 2017 I successfully inserted data into the database and I also understood how to secure query data (script 12.5). But when I try to retrieve data from the DB (script 12.6) accented letters or cyrillic characters aren't properly visualized. For example if for the blog title I inserted "Vocali accentate à è é ì ò ù" [i am from Italy], then when I retrieved data, I got "vocali accentate � � � � � ". An the same goes with cyrillyc characters (I'd like to create a DB in both Russian and Italian language). How can I solve? Please, help me! Thanks. Link to comment Share on other sites More sharing options...
Larry Posted January 24, 2017 Share Posted January 24, 2017 This is an issue of encoding and character sets (two different ways of referring to the same concept, depending upon context). You should be using UTF-8 encoding in your HTML files, your PHP scripts, your text editor, your MySQL connections, and your MySQL table. Link to comment Share on other sites More sharing options...
lynx72 Posted January 25, 2017 Author Share Posted January 25, 2017 Ok, I got it! I solved in this way: //Set the character set: mysqli_set_charset($dbc, 'utf8'); Link to comment Share on other sites More sharing options...
Larry Posted January 29, 2017 Share Posted January 29, 2017 Cool. Thanks for letting us know what worked! Link to comment Share on other sites More sharing options...
Recommended Posts