Hello, I had a postgresql database:
CREATE DATABASE panizzolosas
WITH OWNER = postgres
ENCODING = 'UTF8';
and i'm using sqlalchemy 0.4.2p3.
this is my code
self.metadata=MetaData()
engine = create_engine(stringaDATABASE, encoding='utf-8',
echo=False,convert_unicode=True)
self.metadata.bind= engine
try:
table_ditta=Table('tblditta', self.metadata, autoload=True)
mapper(Ditta, table_ditta)
except :
print "Error"
On the database I had some record with the caracter "à" and if I make
some updates I receive the error
ProgrammingError: (ProgrammingError) invalid byte sequence for
encoding "UTF8": 0xe03537
HINT: This error can also happen if the byte sequence does not match
the encoding expected by the server, which is controlled by
"client_encoding".
'UPDATE tblditta SET codice=%(codice)s WHERE
tblditta.id = %
(tblditta_id)s' {'tblditta_id': 592, 'codice': 'Cibra Publicit
\xe0577'}
\xe0577 is à I suppose..
Any help would be appreciated.
Thanks..
Bye Emyr