colap Posted November 29, 2015 Share Posted November 29, 2015 (edited) I have selected utf8-bin during creation of database. What else should i have to do to insert Bangla? In PHP script there is: echo '<meta charset="utf-8" />'; I am trying with PHP and PDO. It is unreadable characters in mysql table. Edited November 29, 2015 by php-coder Quote Link to comment https://forums.phpfreaks.com/topic/299601-how-can-i-insert-bengalibangla-into-mysql-database/ Share on other sites More sharing options...
Jacques1 Posted November 29, 2015 Share Posted November 29, 2015 (edited) You also have to change the encoding of the database connection to UTF-8. This is done with the charset attribute of the PDO DSN string: $dSN = 'mysql:host=localhost;dbname=testdb;charset=UTF8'; $databaseConnection = new PDO($dSN, ...); Edited November 29, 2015 by Jacques1 Quote Link to comment https://forums.phpfreaks.com/topic/299601-how-can-i-insert-bengalibangla-into-mysql-database/#findComment-1527283 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.