in reply to Connect SQLite with unicode directory

I'm not convinced that the non-ascii character in your code is actually utf-8 (at least not as represented here on this site). Replacing this with its named character (slightly different from Corion's example) I get this test script which passes fine on Linux (having first run mkdir a ü of course). YMMV with other OSes.

#!/usr/bin/perl use utf8; use strict; use warnings; use DBI; use Test::More; my @dbs = ('a/databaseTest1.db', "\N{LATIN SMALL LETTER U WITH DIAERESIS}/databaseTest2.db"); plan tests => 7 * @dbs; for my $db (@dbs) { dbt ($db) } exit; sub dbt { my $dbname = shift; my $dbh = DBI->connect("dbi:SQLite:$dbname", "", "", { RaiseError +=> 1, AutoCommit => 1, PrintError => 1 }); ok ($dbh, "Creating database $dbname"); ok ($dbh->do( "CREATE TABLE data ( ID INTEGER PRIMARY KEY, text, f +ilename)" ), "Created table data"); ok ($dbh->disconnect, "Disconnected from $dbname"); ok (-e $dbname, "Database file exists"); $dbh = DBI->connect("dbi:SQLite:$dbname", "", "", { RaiseError => +1, AutoCommit => 1, PrintError => 1 }); ok ($dbh, "Reconnected to database $dbname"); my $AllDbText_ref = $dbh->selectall_arrayref("SELECT filename FROM + data"); ok (defined $AllDbText_ref, "Results set obtained from $dbname"); ok ($dbh->disconnect, "Disconnected from $dbname"); }

You'll see that I've moved the operations into a subroutine to show that there aren't any differences (and to shorten it). Here's the output:

$ perl sqlt.pl 
1..14
ok 1 - Creating database a/databaseTest1.db
ok 2 - Created table data
ok 3 - Disconnected from a/databaseTest1.db
ok 4 - Database file exists
ok 5 - Reconnected to database a/databaseTest1.db
ok 6 - Results set obtained from a/databaseTest1.db
ok 7 - Disconnected from a/databaseTest1.db
ok 8 - Creating database ü/databaseTest2.db
ok 9 - Created table data
ok 10 - Disconnected from ü/databaseTest2.db
ok 11 - Database file exists
ok 12 - Reconnected to database ü/databaseTest2.db
ok 13 - Results set obtained from ü/databaseTest2.db
ok 14 - Disconnected from ü/databaseTest2.db

HTH, Hippo