Show
Ignore:
Timestamp:
02/02/08 18:56:16 (16 years ago)
Author:
jerome
Message:

Moved some code elsewhere.
Minor changes to ensure that the job's ticket is correctly overwritten when needed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pknotify

    r3295 r3324  
    160160class PyKotaNotify(Tool) :         
    161161    """A class for pknotify.""" 
     162    def UTF8ToUserCharset(self, text) : 
     163        """Converts from UTF-8 to user's charset.""" 
     164        if text is None : 
     165            return None 
     166        else :     
     167            return text.decode("UTF-8", "replace").encode(self.charset, "replace")  
     168         
     169    def userCharsetToUTF8(self, text) : 
     170        """Converts from user's charset to UTF-8.""" 
     171        if text is None : 
     172            return None 
     173        else :     
     174            return text.decode(self.charset, "replace").encode("UTF-8", "replace")     
     175         
    162176    def sanitizeMessage(self, msg) : 
    163177        """Replaces \\n and returns a messagee in xmlrpclib Binary format."""