Changeset 3294 for pykota/trunk/pykota/storage.py
- Timestamp:
- 01/18/08 23:39:41 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storage.py
r3291 r3294 581 581 self.close() 582 582 583 def querydebug(self, qmsg) : 584 """Logs a database query, where all queries are already UTF-8 encoded.""" 585 self.tool.logdebug(qmsg.decode("UTF-8", "replace")) 586 583 587 def getFromCache(self, cachetype, key) : 584 588 """Tries to extract something from the cache.""" … … 728 732 return gpquotas 729 733 730 def databaseToUnicode(self, text) :731 """Converts from database format (UTF-8) to unicode."""732 if text is not None :733 return text.decode("UTF-8", "replace")734 else :735 return None736 737 def unicodeToDatabase(self, text) :738 """Converts from unicode to database format (UTF-8)."""739 if text is not None :740 return text.encode("UTF-8", "replace")741 else :742 return None743 744 734 def cleanDates(self, startdate, enddate) : 745 735 """Clean the dates to create a correct filter."""