Jim Fulton wrote:
> Phillip J. Eby wrote:
> ...
> 
>>I'm pointing out that the use case under consideration isn't specific 
>>*enough* yet.  Do people's log files support unicode?  Do the 
>>authentication systems?  This hasn't been made clear, and it should be.
> 
> 
> I agree.  I think we should be guided by the common log file format.
> Log data are written to files and are thus not unicode. The user
> info is *just* documentation, so it is really up to the app what to
> show imo.  Further, because the common log file format is space
> delimited, the user info cannot contain spaces.

In theory the log file could be encoded in some way, and could include 
spaces in usernames.  Maybe in this case unicode should be allowed, and 
spaces allowed, with the caveat that the log file may not represent 
this?  So for a common log:

   if isinstance(username, unicode):
       username = username.encode('ascii', replace)
   username = username.replace(' ', '')

It is up to the consumer to handle any unicode, and to maintain the 
integrity of their log format regardless of input.

-- 
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to