Cesar Mena <cesarmena@gmail.com> [Sun, 22 Apr 2012 21:27:52 -0400] rev 16493
encoding: protect against non-ascii default encoding
If the default python encoding was changed from ascii, the attempt to
encode as ascii before lower() could throw a UnicodeEncodeError.
Catch UnicodeError instead to prevent an unhandled exception.