Index: pykota/trunk/pykota/tool.py
===================================================================
--- pykota/trunk/pykota/tool.py (revision 3317)
+++ pykota/trunk/pykota/tool.py (revision 3324)
@@ -149,18 +149,4 @@
         arguments = " ".join(['"%s"' % arg for arg in sys.argv])
         self.logdebug("Command line arguments : %s" % arguments)
-        
-    def UTF8ToUserCharset(self, text) :
-        """Converts from UTF-8 to user's charset."""
-        if text is None :
-            return None
-        else :    
-            return text.decode("UTF-8", "replace").encode(self.charset, "replace") 
-        
-    def userCharsetToUTF8(self, text) :
-        """Converts from user's charset to UTF-8."""
-        if text is None :
-            return None
-        else :    
-            return text.decode(self.charset, "replace").encode("UTF-8", "replace")    
         
     def display(self, message) :
Index: pykota/trunk/bin/cupspykota
===================================================================
--- pykota/trunk/bin/cupspykota (revision 3306)
+++ pykota/trunk/bin/cupspykota (revision 3324)
@@ -227,5 +227,5 @@
         
         if not self.checkCUPSVersion() :
-            self.printInfo("BEWARE : CUPS is too old. You must use CUPS v1.3.4 or higher.", "error")
+            self.printInfo("BEWARE : CUPS is too old. You should use CUPS v1.3.4 or higher.", "error")
         
         self.PrinterName = os.environ.get("PRINTER", "")
@@ -259,6 +259,6 @@
         self.UserName = self.Ticket.OriginatingUserName                             
                                      
-        self.DataFile = os.path.join(self.Directory, "%s-%s-%s-%s" % \
-                   (self.myname, self.PrinterName, self.UserName, self.Ticket.JobId))
+        self.DataFile = (os.path.join(self.Directory, "%s-%s-%s-%s" % \
+                   (self.myname, self.PrinterName, self.UserName, self.Ticket.JobId)).encode(sys.getfilesystemencoding(), "replace")
         
         muststartwith = "%s:" % self.myname
@@ -301,5 +301,4 @@
             self.OriginalJobBillingCode = None
         else :    
-            self.Ticket.BillingCode = self.UTF8ToUserCharset(self.Ticket.BillingCode).decode("UTF-8")
             self.OriginalJobBillingCode = self.Ticket.BillingCode[:]
             
@@ -416,11 +415,11 @@
                         action = "CANCEL"
                     elif line.startswith("USERNAME=") :    
-                        username = self.userCharsetToUTF8(line.split("=", 1)[1].strip()).decode("UTF-8")
+                        username = line.split("=", 1)[1].strip().decode(self.charset, "replace")
                         self.logdebug("Seen new username [%s]" % username)
                     elif line.startswith("BILLINGCODE=") :    
-                        billingcode = self.userCharsetToUTF8(line.split("=", 1)[1].strip()).decode("UTF-8")
+                        billingcode = line.split("=", 1)[1].strip().decode(self.charset, "replace")
                         self.logdebug("Seen new billing code [%s]" % billingcode)
                     elif line.startswith("REASON=") :
-                        reason = self.userCharsetToUTF8(line.split("=", 1)[1].strip()).decode("UTF-8")
+                        reason = line.split("=", 1)[1].strip().decode(self.charset, "replace")
                         self.logdebug("Seen new reason [%s]" % reason)
             except IOError, msg :            
Index: pykota/trunk/bin/pknotify
===================================================================
--- pykota/trunk/bin/pknotify (revision 3295)
+++ pykota/trunk/bin/pknotify (revision 3324)
@@ -160,4 +160,18 @@
 class PyKotaNotify(Tool) :        
     """A class for pknotify."""
+    def UTF8ToUserCharset(self, text) :
+        """Converts from UTF-8 to user's charset."""
+        if text is None :
+            return None
+        else :    
+            return text.decode("UTF-8", "replace").encode(self.charset, "replace") 
+        
+    def userCharsetToUTF8(self, text) :
+        """Converts from user's charset to UTF-8."""
+        if text is None :
+            return None
+        else :    
+            return text.decode(self.charset, "replace").encode("UTF-8", "replace")    
+        
     def sanitizeMessage(self, msg) :
         """Replaces \\n and returns a messagee in xmlrpclib Binary format."""
