﻿id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
6786	"usage of strftime() causes a ""Genshi UnicodeDecodeError"""	Jens.Langner@…	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.

The following patch fixes the issues:

{{{
===================================================================
--- ticketchange/web_ui.py	(revision 7751)
+++ ticketchange/web_ui.py	(working copy)
@@ -168,11 +168,11 @@
         row = cursor.fetchone()
         if not row:
             raise ResourceNotFound(""Unable to update comment on Ticket #%d at time '%s' ('%s') - existing change not found.\n"" \
-                                   % (id, time, strftime('%A, %d %b %Y %H:%M:%S', localtime(time))))
+                                   % (id, time, strftime('%x %X', localtime(time))))
         old_author, old_comment = (row[0], row[1])
         cursor.execute(""UPDATE ticket_change SET newvalue=%s WHERE ticket = %s AND time = %s AND field = 'comment'"", (comment, id, time))
         db.commit()
         self.env.log.info(""Ticket #%d comment of '%s' by '%s' has been updated by '%s':\nold value: '%s'\n\nnew value: '%s'\n"" \
-                        % (id, strftime('%A, %d %b %Y %H:%M:%S', localtime(time)), old_author, author, old_comment.replace('\r', ''), comment.replace('\r','')))
+                        % (id, strftime('%x %X', localtime(time)), old_author, author, old_comment.replace('\r', ''), comment.replace('\r','')))
}}}"	defect	closed	normal	TicketChangePlugin	critical	fixed			0.11
