Opened 17 years ago

Closed 17 years ago

#6254 closed (fixed)

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

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

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))])

Change History (3)

comment:1 by Matt McClanahan, 17 years ago

Component: UncategorizedDatabase wrapper

comment:2 by Erin Kelly, 17 years ago

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

comment:3 by Erin Kelly, 17 years ago

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