diff options
author | Guilhem Moulin <guilhem.moulin@ens-lyon.org> | 2012-02-28 21:43:52 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@ens-lyon.org> | 2012-02-28 21:43:52 +0100 |
commit | c8f9e3aa4ffd44d4cdf750e239325a4295c509cd (patch) | |
tree | 3d4a58ff6a94468468fd6e0067f17b3b22df7e72 | |
parent | 0ec5831d64fe108e3f4a7c621fbe872338996616 (diff) |
unicode, cont
-rwxr-xr-x | videoadd.pl | 5 | ||||
-rwxr-xr-x | videodb-check.pl | 3 | ||||
-rw-r--r-- | videodb.rc | 1 | ||||
-rwxr-xr-x | videomv.pl | 4 | ||||
-rwxr-xr-x | videorm.pl | 4 |
5 files changed, 6 insertions, 11 deletions
diff --git a/videoadd.pl b/videoadd.pl index d76ad14..bb70614 100755 --- a/videoadd.pl +++ b/videoadd.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w -CADSL # This program is free software. It comes without any warranty, to the # extent permitted by applicable law. You can redistribute it and/or @@ -241,7 +241,6 @@ unless ( defined $ignoredb_flag ) { } $dbh = DBI->connect($dsn, $config{user}, $config{password}) or die "Error: Can't connect do database.\n"; - $dbh->do( "SET NAMES UTF8" ) or die "Error: Can't set names to UTF-8.\n"; } my $id; @@ -290,7 +289,7 @@ if ( defined ($imdb{crit}) and &runIMDB() ) { # Got a single result; Process the movie $new{title} = $movie->title(); $new{language} = lc join (', ', @{$movie->language()}); - $new{imdbid} = 'imdb:' $movie->id(); + $new{imdbid} = 'imdb:' .$movie->id(); $new{year} = $movie->year(); $new{imgurl} = $movie->cover(); $new{director} = join ', ', map {$_->{name}} @{$movie->directors()}; diff --git a/videodb-check.pl b/videodb-check.pl index bf45d6b..cd0baa3 100755 --- a/videodb-check.pl +++ b/videodb-check.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w -CADSL # This program is free software. It comes without any warranty, to the # extent permitted by applicable law. You can redistribute it and/or @@ -143,7 +143,6 @@ if (defined $config{dbi_misc}) { } my $dbh = DBI->connect($dsn, $config{user}, $config{password}) or die "Can't connect do database\n"; -$dbh->do( "set names utf8" ) or die; ################################################################################ @@ -11,6 +11,7 @@ user => 'username', # Optional extra connection options dbi_misc => { mysql_ssl => 1 , mysql_ssl_ca_file => "/etc/ssl/certs/cacert.org.pem" + , mysql_enable_utf8 => 1 }, password => '******', prefix => 'videodb_', @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w -CADSL # This program is free software. It comes without any warranty, to the # extent permitted by applicable law. You can redistribute it and/or @@ -388,8 +388,6 @@ unless (defined $ignoredb_flag) { } $dbh = DBI->connect($dsn, $config{user}, $config{password}) or die "Can't connect do database"; - $dbh->do( "set names utf8" ) or die; - # Lookup for the file in the videodb database $RES = @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w -CADSL # This program is free software. It comes without any warranty, to the # extent permitted by applicable law. You can redistribute it and/or @@ -170,8 +170,6 @@ if (defined $config{dbi_misc}) { } my $dbh = DBI->connect($dsn, $config{user}, $config{password}) or die "Can't connect do database.\n"; -$dbh->do( "set names utf8" ) or die; - # Lookup for the file in the videodb database my $res = $dbh->selectall_arrayref ( "SELECT id FROM $config{prefix}videodata WHERE filename = ?", |