If connecting to MySQL with:
my $schema = MyDatabase::Main->connect("dbi:mysql:database=$database;host=$host",'root','', {mysql_enable_utf8 => 1});
The connection is forced to utf8;
Connect to SQLite:
my $schema = MyDatabase::Main->connect('dbi:SQLite:data/sample.db', {sqlite_unicode => 1});
The connection seems not to be in utf8;
The purpose is to eliminate having to use decode() while fetching data: from:
Mojo::ByteStream->new($cycle->type)->decode('utf-8')
to:
$cycle->type
Thanks