From: Patrick Simon Date: Wed, 1 Apr 2015 09:38:39 +0000 (+0200) Subject: example for utf8 encoding X-Git-Tag: v1.001_030~5^2^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6367db27848ea42be06968f63a0612089644debc;p=dbsrgits%2FDBIx-Class-Fixtures.git example for utf8 encoding --- diff --git a/.gitignore b/.gitignore index cc26ed0..e442fbf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ .*.sw? \.DS_Store .prove +local/ +cpanfile +cpanfile.snapshot diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index 08c0e27..8e4c560 100755 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -5,6 +5,8 @@ use strict; use warnings; use DBICTest::Schema; +use utf8; + =head1 NAME DBICTest - Library to be used by DBIx::Class test scripts. @@ -60,7 +62,7 @@ sub init_schema { my $schema; - my @connect_info = ($dsn, $dbuser, $dbpass, { AutoCommit => 1 }); + my @connect_info = ($dsn, $dbuser, $dbpass, { AutoCommit => 1, sqlite_unicode => 1 }); if ($args{compose_connection}) { $schema = DBICTest::Schema->compose_connection( @@ -158,7 +160,7 @@ sub populate_schema { [ 2, 1, "Forkful of bees", 2001 ], [ 3, 1, "Caterwaulin' Blues", 1997 ], [ 4, 2, "Generic Manufactured Singles", 2001 ], - [ 5, 2, "We like girls and stuff", 2003 ], + [ 5, 2, "Wir übertreiben überhaupt nicht", 2003 ], [ 6, 3, "Come Be Depressed With Us", 1998 ], ]); diff --git a/t/var/fixtures/CD/5.fix b/t/var/fixtures/CD/5.fix new file mode 100644 index 0000000..7fb848f --- /dev/null +++ b/t/var/fixtures/CD/5.fix @@ -0,0 +1,6 @@ +$HASH1 = { + artist => 2, + cdid => 5, + title => "Wir \374bertreiben \374berhaupt nicht", + year => 2003 + };