FAQ
Hello, i am using py-postgresql as the driver the database, when make a
select to a string with non-ASCII characters, the response replace the
character with "?" what can i make to change this to the correct character?

This is my code:

<code>class decodify:

def __init__(self):
db = pgDriver.connect(user = 'demo', password='demo'
database='hidura_karinapp', host='localhost', port='5432')
d = db.prepare("""SELECT modules_reg.code FROM modules_reg,
domain_reg, sbdomain_reg, sbdomdl_asc where(modules_reg.id =
sbdomdl_asc.module AND modules_reg.mdname = 'police' AND sbdomain_reg.id =
sbdomdl_asc.domain AND sbdomain_reg.domain = domain_reg.id AND
domain_reg.dname = 'bmsuite.com' AND sbdomain_reg.sbname = 'www')""")
s = d()
print(s)

if __name__ == '__main__':
decodify()</code>

--
Diego I. Hidalgo D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110218/89738991/attachment.html>

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 18, '11 at 4:19a
activeFeb 18, '11 at 4:19a
posts1
users1
websitepython.org

1 user in discussion

Hidura: 1 post

People

Translate

site design / logo © 2023 Grokbase