Opened 12 years ago

Closed 12 years ago

#6254 closed (fixed)

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

Reported by: fuzh <gif98@…> Owned by: Ian Kelly
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: no UI/UX: no


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 12 years ago by Matt McClanahan

Component: UncategorizedDatabase wrapper

comment:2 Changed 12 years ago by Ian Kelly

Owner: changed from nobody to Ian Kelly
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:3 Changed 12 years ago by Ian Kelly

Resolution: fixed
Status: assignedclosed

(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