8 my $schema = DBICTest->init_schema();
11 or plan skip_all => 'Need utf8 run this test';
15 DBICTest::Schema::CD->load_components('UTF8Columns');
16 DBICTest::Schema::CD->utf8_columns('title');
17 Class::C3->reinitialize();
19 my $cd = $schema->resultset('CD')->create( { artist => 1, title => 'øni', year => 'foo' } );
20 ok( utf8::is_utf8( $cd->title ), 'got title with utf8 flag' );
21 ok( !utf8::is_utf8( $cd->year ), 'got year without utf8 flag' );
23 my $utf8_char = 'uniuni';
24 utf8::decode($utf8_char);
25 $cd->title($utf8_char);
26 ok( !utf8::is_utf8( $cd->{_column_data}{title} ),
27 'store utf8-less chars' );