verificar charset dum ficheiro
10 Feb 2017
file --mime-encoding 'ficheiro.ext'
file --mime-encoding 'ficheiro.ext'
verificar collation e charset aqui
modificar o default collation da base de dados:
SELECT DISTINCT concat('ALTER DATABASE ', TABLE_SCHEMA, ' CHARACTER SET utf8 COLLATE utf8_general_ci;') from information_schema.tables where TABLE_SCHEMA like 'database_name';
http://stackoverflow.com/questions/5906585/how-to-change-the-default-collation-of-a-database
modificar o default charset e collation de todas as tabelas na base de dados:
To discover the character set and collation of a database, just
USE your_database_of_interest;
and type,
show variables like "character_set_database";
show variables like "collation_database";
http://dev.mysql.com/doc/refman/5.0/en/charset-database.html