id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 22377,SQL Logging throws an exception when fields have utf-8 characters,rolanvc@…,nobody,"In django/db/backends/util.py, in CursorDebugWrapper.execute, the line: {{{ logger.debug('(%.3f) %s; args=%s' % (duration, sql, params), extra={'duration': duration, 'sql': sql, 'params': params} ) }}} throws a ""UnicodeDecodeError:ascii codec .... "" when calling model.save() when some fields have utf-8/non-ascii values. My only workaround is to modify it to: {{{ logger.debug('(%.3f) %s; args=%s' % (duration, sql.decode('utf-8'), params), extra={'duration': duration, 'sql': sql, 'params': params} ) }}} I'm hoping there's a better and more elegant way that I could use. Thanks! =)",Bug,closed,"Database layer (models, ORM)",1.9,Normal,needsinfo,sql logging for utf-8,,Unreviewed,0,0,0,0,0,0