1

My MariaDB 10 database is UTF8 at the column, table, and database level. But I just created a new table in the db using MySQL Workbench and it was created by default as Latin1.

Googling shows one potential reason is if the client connects using Latin1 rather than UTF8.

1) Is there a way in MySQL Workbench to check the connection encoding?

2) Is there a way to set the default connection encoding to UTF8?

The most recent answer I could find was from 2011 and said MySQL Workbench only supported Latin1, but surely UTF8 is supported by now...

Jeff Widman
  • 22,014
  • 12
  • 72
  • 88
  • You can check the connection encoding by running: `SHOW VARIABLES LIKE 'collation%';` Check [this](http://stackoverflow.com/a/3513812/2289750) to set the default encoding and connection to utf-8. I am not sure if this apply on MariaDB or you are on a linux server or not, but you can also use MySQL Workbench management panel and Options File section. – George Jan 24 '15 at 16:44

1 Answers1

2

I'd like to see where you found the posting that said MySQL Workbench would only support Latin 1. That's just nonsense. The application has always been using UTF-8 internally for all string processing and for all communication. Since day 1. So, the encoding used by MySQL Workbench is certainly not the reason why your table's charset was set to Latin 1 at creation time. I'd rather suspect a problem between MariaDB and WB, but that's just a wild guess.

When you create a table and leave it's charset at the default, that means there is no charset given and the server is responsible to use the current schema default charset. So, rather look there. As a test you could create a table with an explicit charset (also something other than Latin 1 and UTF-8), just to see that works as expected.

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
  • Thanks for the detailed answer. You're totally correct about MySQL Workbench and UTF 8. I didn't deep enough--just saw these two references and assumed they were right: http://forums.mysql.com/read.php?152,372696,372696 and http://stackoverflow.com/questions/6860086/mysql-workbench-charset – Jeff Widman Jan 26 '15 at 22:49