Answer the question
In order to leave comments, you need to log in
MySQL dump file and encodings. Need help
Preamble
So. I have a database of one site. It's happening on Windows. MySQL 5.5.
Encodings are always in UTF8.
mysql> show global variables like 'char%'; character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_filesystem binary character_set_results utf8 character_set_server utf8 character_set_system utf8
Driver={MySQL};Stmt=SET NAMES 'utf8';SERVER=localhost;DATABASE=Mybase;UID=Myuser;PWD=Mypass;
Answer the question
In order to leave comments, you need to log in
Nothing is said how the data got into the database. But I see that they were written there in CP1251.
Console in windows with cp866 encoding, that's why it's 'crazy'... what's in test.txt?
mysql .... -e "select * from table" > test.txt
At the beginning of the dump, sometimes it would also be nice to write SET NAMES utf8;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question