[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3958] branches/1.3/LedgerSMB/Database.pm



Revision: 3958
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3958&view=rev
Author:   einhverfr
Date:     2011-11-05 01:41:26 +0000 (Sat, 05 Nov 2011)
Log Message:
-----------
David Bandel's patch for database encoding issues

Modified Paths:
--------------
    branches/1.3/LedgerSMB/Database.pm

Modified: branches/1.3/LedgerSMB/Database.pm
===================================================================
--- branches/1.3/LedgerSMB/Database.pm	2011-11-04 10:42:54 UTC (rev 3957)
+++ branches/1.3/LedgerSMB/Database.pm	2011-11-05 01:41:26 UTC (rev 3958)
@@ -250,7 +250,9 @@
 
 =item $db->create();
 
-Creates a database and loads the contrib files.
+Creates a database and loads the contrib files.  This is done from template0, 
+meaning nothing added to template1 will be found in this database.  This was 
+necessary as a workaround for issues on some Debian systems.
 
 Returns true if successful, false of not.  Creates a log called dblog in the 
 temporary directory with all the output from the psql files.  
@@ -263,7 +265,10 @@
 sub create {
     my ($self) = @_;
     
-    my $rc = system("createdb -E UTF8 > $temp/dblog");
+    # We have to use template0 because of issues that Debian has with database 
+    # encoding.  Apparently that causes problems for us, so template0 must be
+    # used.
+    my $rc = system("createdb -t template0 -E UTF8 > $temp/dblog");
     if ($rc) {
         return $rc;
     }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.