X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fcommod-email-processor;h=a75864a57e2ff4f0d3d48514697f78d900a14d24;hp=79db83d4e97d8b063cebf21496a58b65ea36e41c;hb=9e7b2a51983738ccfaac47f13142889fa6f9a7b0;hpb=01c14767c024ac56686dbbfcd88d9f3a0b4b1574 diff --git a/yarrg/commod-email-processor b/yarrg/commod-email-processor index 79db83d..a75864a 100755 --- a/yarrg/commod-email-processor +++ b/yarrg/commod-email-processor @@ -39,7 +39,7 @@ BEGIN { use Commods; use CommodsDatabase; -setlocale(LC_CTYPE, "en_GB.UTF-8"); +set_ctype_utf8(); my $parser= new MIME::Parser; our $entity; @@ -134,7 +134,7 @@ sub main () { "SELECT stallid FROM stalls WHERE islandid == $islandid AND stallname == ? "); - $sth_insert{'commods'}= $dbh->prepare( + $sth_insert{'commod'}= $dbh->prepare( "INSERT OR IGNORE INTO commods (commodname) VALUES (?) @@ -195,7 +195,7 @@ sub main () { pipethrough_run_finish($pt, 'gunzip <$deduped_tsv.gz'); # print "\n"; - $dbh->commit(); + db_chkcommit(0); # select * from ((buy natural join commods) natural join stalls) natural join islands; # select * from ((sell natural join commods) natural join stalls) natural join islands;