Opened 8 years ago

Closed 8 years ago

#6254 closed (fixed)

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

Reported by: fuzh <gif98@…> Owned by: ikelly
Component: Database layer (models, ORM) Version: master
Severity: Keywords: oracle db backends
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


in db/backends/oracle/ ,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
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))])

Change History (3)

comment:1 Changed 8 years ago by mattmcc

  • Component changed from Uncategorized to Database wrapper
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 8 years ago by ikelly

  • Owner changed from nobody to ikelly
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 8 years ago by ikelly

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Note: See TracTickets for help on using tickets.
Back to Top