I have a similar problem: varchar field with sorting utf8_bin, having ASCII-8BIT encoding.
The problem is gem mysql2, not Rails or mysql settings, at least in my case, because this does not happen with ruby-mysql stone.
Please check if the problem persists when switching to ruby-mysql.
, irb ruby 1.9.2, :
require 'mysql2'
c = Mysql2::Client.new(host: "localhost", username: "root", database: 'd')
c.query("select word from t where word = 'a'").to_a[0]["word"].encoding
# => #<Encoding:ASCII-8BIT>
mysql, utf8_bin.
gem mysql2 result.c 253 :
if (fields[i].flags & BINARY_FLAG) {
rb_enc_associate(val, binaryEncoding);
} else ...
, (ASCII-8BIT), - utf8_bin... , , , , , , , .