Returns the current database encoding
format as a string, eg: ‘UTF-8’
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 50
def encoding
if @connection.respond_to?(:encoding)
@connection.encoding.to_s
else
encoding = @connection.execute('PRAGMA encoding')
encoding[0]['encoding']
end
end