I am using Codeigniter and mySQL and want to retrieve that Hindi text 'नमस्ते दुनिया' and display it using SELECT * FROM table where text LIKE '%नमस्ते%'
which I am unable to do.
Asked
Active
Viewed 238 times
0

Shadow
- 33,525
- 10
- 51
- 64

Parin Nagda
- 55
- 9
-
you want to make sure that your charset is set to utf8 at least [ReadThis](https://stackoverflow.com/questions/3328968/how-to-store-unicode-in-mysql) – eshirvana Nov 06 '20 at 19:15
-
1charset is utf-8 and dbcollat is utf8_general_ci – Parin Nagda Nov 06 '20 at 19:17
-
maybe codeignite is not passing queries in unicode format , you may want to check that out. – eshirvana Nov 06 '20 at 19:18
-
2Does this answer your question? [How to insert Hindi language in Mysql](https://stackoverflow.com/questions/11292898/how-to-insert-hindi-language-in-mysql) – Vickel Nov 06 '20 at 19:48
-
Does that query work directly in your mysql without the use of codeigniter? Check that first to make sure that there's nothing wrong with the database collation and charset first. – marcogmonteiro Nov 06 '20 at 22:51
-
@Parin Nagda where is your error comes?? – KUMAR Nov 07 '20 at 05:26
1 Answers
0
ALTER TABLE Table convert to CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
This worked for me

Parin Nagda
- 55
- 9
-
please marked this as accepted answer if it solved your problem for future readers.. – KUMAR Nov 07 '20 at 07:17