Django

Code

Ticket #3891 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

CursorDebugWrapper unicode problems

Reported by: mbrezu@gmail.com Assigned to: adrian
Milestone: Component: Database wrapper
Version: SVN Keywords: debug unicode unicode-branch
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Using Django 0.96/development server/mysql.

I'm writing unicode strings into the db. Writing actually succeeds, but when the sql query is logged by CursorDebugWrapper?, I see a UnicodeDecodeError? at line 19, in django/db/backends/util.py

            if not isinstance(params, (tuple, dict)):
                params = tuple(params)
            # UnicodeDecodeError raised here
            self.db.queries.append({
                'sql': sql % params,
                'time': "%.3f" % (stop - start),
            })

Attachments

Change History

04/01/07 05:25:46 changed by Simon G. <dev@simon.net.nz>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

Another one of the unicode-to-fix issues

05/12/07 10:40:46 changed by mtredinnick

(In [5208]) unicode: Make sure we don't try to insert unicode data into bytestrings in the debug database cursor. Might not be necessary, but it can't hurt in any case. Refs #3891.

05/12/07 10:41:30 changed by mtredinnick

  • keywords changed from debug unicode to debug unicode unicode-branch.

I think this has been fixed in two or three different ways on the unicode branch (including the commit in the above comment). I'll close this ticket when the branch is merged with trunk.

05/15/07 11:13:37 changed by mtredinnick

(In [5247]) unicode: Improved the fix for debug query logging from [5208]. Refs #3891.

07/04/07 07:11:05 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [5609]) Merged Unicode branch into trunk (r4952:5608). This should be fully backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


Add/Change #3891 (CursorDebugWrapper unicode problems)




Change Properties
Action