Index: pykota/trunk/pykota/storages/pgstorage.py
===================================================================
--- pykota/trunk/pykota/storages/pgstorage.py (revision 2418)
+++ pykota/trunk/pykota/storages/pgstorage.py (revision 2593)
@@ -118,2 +118,18 @@
             typ = "text"
         return pg._quote(field, typ)
+        
+    def prepareRawResult(self, result) :
+        """Prepares a raw result by including the headers."""
+        if result.ntuples() > 0 :
+            entries = [result.listfields()]
+            entries.extend(result.getresult())
+            nbfields = len(entries[0])
+            for i in range(1, len(entries)) :
+                fields = list(entries[i])
+                for j in range(nbfields) :
+                    field = fields[j]
+                    if type(field) == StringType :
+                        fields[j] = self.databaseToUserCharset(field) 
+                entries[i] = tuple(fields)    
+            return entries
+        
Index: pykota/trunk/pykota/storages/sql.py
===================================================================
--- pykota/trunk/pykota/storages/sql.py (revision 2464)
+++ pykota/trunk/pykota/storages/sql.py (revision 2593)
@@ -30,19 +30,4 @@
 
 class SQLStorage :
-    def prepareRawResult(self, result) :
-        """Prepares a raw result by including the headers."""
-        if result.ntuples() > 0 :
-            entries = [result.listfields()]
-            entries.extend(result.getresult())
-            nbfields = len(entries[0])
-            for i in range(1, len(entries)) :
-                fields = list(entries[i])
-                for j in range(nbfields) :
-                    field = fields[j]
-                    if type(field) == StringType :
-                        fields[j] = self.databaseToUserCharset(field) 
-                entries[i] = tuple(fields)    
-            return entries
-        
     def createFilter(self, only) :    
         """Returns the appropriate SQL filter."""
Index: pykota/trunk/pykota/storages/sqlitestorage.py
===================================================================
--- pykota/trunk/pykota/storages/sqlitestorage.py (revision 2591)
+++ pykota/trunk/pykota/storages/sqlitestorage.py (revision 2593)
@@ -123,2 +123,18 @@
         else :     
             return "NULL"
+            
+    def prepareRawResult(self, result) :
+        """Prepares a raw result by including the headers."""
+        if result :
+            entries = [tuple([f[0] for f in self.cursor.description])]
+            for entry in result :    
+                row = []
+                for value in entry :
+                    try :
+                        value = value.encode("UTF-8")
+                    except :
+                        pass
+                    row.append(value)
+                entries.append(tuple(row))    
+            return entries   
+        
Index: pykota/trunk/pykota/config.py
===================================================================
--- pykota/trunk/pykota/config.py (revision 2583)
+++ pykota/trunk/pykota/config.py (revision 2593)
@@ -95,9 +95,17 @@
         """Returns the storage backend information as a Python mapping."""        
         backendinfo = {}
-        for option in [ "storagebackend", "storageserver", \
-                        "storagename", "storageuser", \
-                      ] :
-            backendinfo[option] = self.getGlobalOption(option)
-        backendinfo["storageuserpw"] = self.getGlobalOption("storageuserpw", ignore=1)  # password is optional
+        backend = self.getGlobalOption("storagebackend").lower()
+        backendinfo["storagebackend"] = backend
+        if backend == "sqlitestorage" :
+            issqlite = 1
+            backendinfo["storagename"] = self.getGlobalOption("storagename")
+            for option in ["storageserver", "storageuser", "storageuserpw"] :
+                backendinfo[option] = None          
+        else :
+            issqlite = 0
+            for option in ["storageserver", "storagename", "storageuser"] :
+                backendinfo[option] = self.getGlobalOption(option)
+            backendinfo["storageuserpw"] = self.getGlobalOption("storageuserpw", ignore=1)  # password is optional
+            
         backendinfo["storageadmin"] = None
         backendinfo["storageadminpw"] = None
@@ -109,5 +117,6 @@
                     backendinfo["storageadmin"] = adminconf.get("global", "storageadmin", raw=1)
                 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError) :    
-                    raise PyKotaConfigError, _("Option %s not found in section global of %s") % ("storageadmin", self.adminfilename)
+                    if not issqlite :
+                        raise PyKotaConfigError, _("Option %s not found in section global of %s") % ("storageadmin", self.adminfilename)
                 try :
                     backendinfo["storageadminpw"] = adminconf.get("global", "storageadminpw", raw=1)
Index: pykota/trunk/pykota/version.py
===================================================================
--- pykota/trunk/pykota/version.py (revision 2588)
+++ pykota/trunk/pykota/version.py (revision 2593)
@@ -22,5 +22,5 @@
 #
 
-__version__ = "1.24alpha3_unofficial"
+__version__ = "1.24alpha4_unofficial"
 
 __doc__ = "PyKota : a complete Printing Quota Solution for CUPS."
