Changeset 2460

Show
Ignore:
Timestamp:
09/18/05 00:19:35 (19 years ago)
Author:
jerome
Message:

Fixed encoding problems for a payment's description

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r2459 r2460  
    3434import time 
    3535import md5 
     36import base64 
    3637from mx import DateTime 
    3738 
     
    389390                        description = "" 
    390391                    else :     
    391                         description = self.databaseToUserCharset(description) 
     392                        description = self.databaseToUserCharset(base64.decodestring(description)) 
    392393                    user.Payments.append((date, float(amount), description)) 
    393394            user.Exists = 1 
     
    976977        for payment in user.Payments : 
    977978            payments.append("%s # %s # %s" % (payment[0], str(payment[1]), payment[2])) 
    978         payments.append("%s # %s # %s" % (str(DateTime.now()), str(amount), self.userCharsetToDatabase(comment))) 
     979        payments.append("%s # %s # %s" % (str(DateTime.now()), str(amount), base64.encodestring(self.userCharsetToDatabase(comment)).strip())) 
    979980        fields = { 
    980981                   "pykotaPayments" : payments,