Migrating Kannada language data from mysql to MongoDb using PHP script

In MySql I have some set of data in kannada (ಕನ್ನಡ್) which i wanted to migrate to MongoDb using PHP script. But it is coming like ???? in mongoDb. How can i transfer/migrate exact data from MySql to MongoDb??

It’s not elixir related :). but you have encoding issues. Debug your code and if needed use ‘mb’ library in php.

That is y i selected General Programming And Other Languages :wink:

1 Like

Yep, I just see. Give us more details. Debug output, code samples.

Yeah first what encoding is both the mysql and mongodb database’s set to for those fields?

Have in mind that MySQL can use several kinds of Unicode encodings internally. First make sure that you can do a pure MySQL query inside a console that actually prints the correct data.

If that is true, inspect your console’s metadata attributes and write down both the internal encoding the and the encoding used by the MySQL console.

I fought with MySQL encoding issues before and 99% of the time people simply didn’t check for the actual encoding of the data.

Finally, please note that MySQL can allow you to re-code your text as you export it with queries.