Django

Code

Ticket #6254 (closed: fixed)

Opened 7 months ago

Last modified 6 months ago

fetchone() method in oracle backends could not return correct unicode

Reported by: fuzh <gif98@163.com> Assigned to: ikelly
Milestone: Component: Database wrapper
Version: SVN Keywords: oracle db backends base.py
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

in db/backends/oracle/basy.py ,line 513: return to_unicode(Database.Cursor.fetchone(self))

fetchone() return a tuple,and to_unicode method do nothing to tuple: def to_unicode(s):

""" Convert strings to Unicode objects (and return all other data types unchanged). """ if isinstance(s, basestring):

return force_unicode(s)

return s

line 513 may like this:

return tuple([to_unicode(e) for e in Database.Cursor.fetchone(self))])

Attachments

Change History

12/21/07 03:24:32 changed by mattmcc

  • needs_better_patch changed.
  • component changed from Uncategorized to Database wrapper.
  • needs_tests changed.
  • needs_docs changed.

01/04/08 13:48:54 changed by ikelly

  • owner changed from nobody to ikelly.
  • status changed from new to assigned.
  • stage changed from Unreviewed to Accepted.

01/04/08 16:51:22 changed by ikelly

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

(In [6995]) Fixed #6254: Made fetchone() in the oracle backend correctly convert strings to unicode objects.


Add/Change #6254 (fetchone() method in oracle backends could not return correct unicode)




Change Properties
Action