views:

36

answers:

1

I have a MySQL table where I store text entered in any kind of language. The text is displayed correctly on the website, example but when I export the data to Excel I get garbled text.

I tried exporting the data via PHPMyAdmin and even just doing something from the command line like mysql -user -p db < query.sql > export.tsv and I get garbled text. For example instead of animación I get animación or instead of แอนนิเมชั่น I get à¹à¸­à¸™à¸™à¸´à¹€à¸¡à¸Šà¸±à¹ˆà¸™.

This could be a combination of factors involving Excel, MySQL and PHPMyAdmin, but I imagine others have tried to do the same.

A: 

Excel and Mysql support Unicode fully, but PHP (I think) doesn't have very good Unicode support, so you may be having trouble exporting from PHPMyAdmin for that reason.

Look on the web for a good mysql manager which will export data from your tables correctly in Unicode format and you should be fine.

Toby Allen