id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
6786,usage of strftime() causes a "Genshi UnicodeDecodeError",Jens.Langner@light-speed.de,rjollos,Similar to ticket #4820 this plugins suffers from incorrectly using strftime() which in turn causes a "Genshi UnicodeDecodeError" to appear when a ticket is changed and the Locale is not english.\r\n\r\nThe following patch fixes the issues:\r\n\r\n{{{\r\n===================================================================\r\n--- ticketchange/web_ui.py	(revision 7751)\r\n+++ ticketchange/web_ui.py	(working copy)\r\n@@ -168_11 +168_11 @@\r\n         row = cursor.fetchone()\r\n         if not row:\r\n             raise ResourceNotFound("Unable to update comment on Ticket #%d at time '%s' ('%s') - existing change not found.\\n" \\\r\n-                                   % (id_ time_ strftime('%A_ %d %b %Y %H:%M:%S'_ localtime(time))))\r\n+                                   % (id_ time_ strftime('%x %X'_ localtime(time))))\r\n         old_author_ old_comment = (row[0]_ row[1])\r\n         cursor.execute("UPDATE ticket_change SET newvalue=%s WHERE ticket = %s AND time = %s AND field = 'comment'"_ (comment_ id_ time))\r\n         db.commit()\r\n         self.env.log.info("Ticket #%d comment of '%s' by '%s' has been updated by '%s':\\nold value: '%s'\\n\\nnew value: '%s'\\n" \\\r\n-                        % (id_ strftime('%A_ %d %b %Y %H:%M:%S'_ localtime(time))_ old_author_ author_ old_comment.replace('\\r'_ '')_ comment.replace('\\r'_'')))\r\n+                        % (id_ strftime('%x %X'_ localtime(time))_ old_author_ author_ old_comment.replace('\\r'_ '')_ comment.replace('\\r'_'')))\r\n}}},defect,closed,normal,TicketChangePlugin,critical,fixed,,,0.11
