I have this multibyte arabic text string:
فتكات اكبر تجمع عربي للنساء فقط صحبة وإسلاميات واستشارات وطبخ وزواج وميك اب وتخسيس
وفضفضة وازياء ومحجبات وهوايات ومول وكليسش مال يهم المرأةفتكات اكبر تجمع عربي للنساء فقط
صحبة وإسلاميات واستشارات وطبخ وزواج وميك اب وتخسيس وفضفضة وازياء ومحجبات وهوايات ومو
When running PHP mb_strlen function on the string, I get 255 characters which is correct.
Then I tried to insert the string into a column with VARCHAR(255)
using PHP
Then I selected it again from the database using PHP and the following is the output:
تكات اكبر تجمع عربي للنساء فقط صحبة وإسلاميات واستشارات وطبخ وزواج وميك اب وتخسيس وفضفضة
وازياء ومحجبات وهوايات ومول وكليسش مال يهم المرأ�
So as you see, almost half of the string has been truncated. I don't know this has to do with MYSQL or PHP output.
Here is my database specs: MYSQL 5+, ENGINE=InnoDB, DEFAULT CHARSET=utf8, utf8_general_ci
And in PHP I'm using PDO statements to connect, insert, and select from the database.
Is there any extra query I need to use when inserting or selecting from database or any PHP function that I must use during insertion or selection?