Index: /pykota/trunk/conf/pykota.conf.sample
===================================================================
--- /pykota/trunk/conf/pykota.conf.sample (revision 3162)
+++ /pykota/trunk/conf/pykota.conf.sample (revision 3169)
@@ -329,22 +329,24 @@
 
 
-# Should we force usernames to be all lowercase when printing ?
-# Default is No. 
+# Should we modify usernames when printing ?
+# Default is native, meaning usernames won't be modified.
 # This is a [global] option only.
-# Some people reported that WinXP sends mixed case usernames
-# setting 'utolower: Yes' solves the problem.
-# Of course you have to use lowercase only when adding
-# users with edpykota, because ALL database accesses are
+# Some people reported that WinXP sends mixed case usernames,
+# setting usernamecase to 'upper' or 'lower' solves the problem.
+# Of course you have to use uppercase or lowercase only when managing
+# users with pkusers, because ALL database accesses are
 # still case sensitive.
 #
-# If utolower is Yes, the usernames received from the printing
-# system is converted to lowercase at the start of printing,
-# BUT ONLY when printing.
-#
-# If utolower is No, which is the default, strict case checking
+# If usernamecase is 'upper' or 'lower', the usernames received 
+# from the printing system are converted to uppercase or lowercase, 
+# respectively, at the start of printing, BUT ONLY when printing.
+#
+# If usernamecase is 'native', which is the default, strict case checking
 # is done, this means that users 'Jerome' and 'jerome' are
 # different. Printer and groups names are ALWAYS case sensitive.
 #
-utolower: No
+# usernamecase : upper
+# usernamecase : lower
+usernamecase: native
 
 
Index: /pykota/trunk/pykota/config.py
===================================================================
--- /pykota/trunk/pykota/config.py (revision 3162)
+++ /pykota/trunk/pykota/config.py (revision 3169)
@@ -77,5 +77,5 @@
         except (ConfigParser.NoSectionError, ConfigParser.NoOptionError) :    
             if ignore :
-                return
+                return None
             else :
                 raise PyKotaConfigError, _("Option %s not found in section global of %s") % (option, self.filename)
@@ -522,6 +522,16 @@
             
     def getUserNameToLower(self) :          
-        """Returns True if we want to convert usernames to lowercase when printing, else False."""
-        return self.isTrue(self.getGlobalOption("utolower", ignore=1))
+        """Deprecated."""
+        return self.getGlobalOption("utolower", ignore=1)
+        
+    def getUserNameCase(self) :
+        """Returns value for user name case: upper, lower or native"""
+        validvalues = [ "upper", "lower", "native" ]
+        value = self.getGlobalOption("usernamecase", ignore=1).strip().lower()
+        if value is None :
+            value = "native"
+        if value not in validvalues :
+            raise PyKotaConfigError, _("Option usernamecase only supports values in %s") % str(validvalues)
+        return value
         
     def getRejectUnknown(self) :          
Index: /pykota/trunk/bin/cupspykota
===================================================================
--- /pykota/trunk/bin/cupspykota (revision 3159)
+++ /pykota/trunk/bin/cupspykota (revision 3169)
@@ -391,7 +391,13 @@
             self.UserName = self.UserName.split(separator)[-1]
             
-        # do we want to lowercase usernames ?    
-        if self.config.getUserNameToLower() :
-            self.UserName = self.UserName.lower()
+        # this option is deprecated, and we want to tell people    
+        # this is the case.
+        dummy = self.config.getUserNameToLower()
+        if dummy is not None :
+            self.printInfo("Option 'utolower' is deprecated. Please use the 'usernamecase' option instead. Syntax is 'usernamecase: lower|upper|native' and defaults to 'native'.", "error")
+        # Now use the newer and more complete 'usernamecase' directive.    
+        casechange = self.config.getUserNameCase()    
+        if casechange != "native" :
+            self.UserName = getattr(self.UserName, casechange)()
             
         # do we want to strip some prefix off of titles ?    
