[storm] Latin-1 Character Set
kevin gill
kevin at movieextras.ie
Tue Oct 28 19:52:26 GMT 2008
I have been trying out storm and stormcontainer with Zope3 today. It is
nice and simple. Great product.
I had one problem, that my database is latin-1 (historic reasons) and
storm is hard-coded to UTF-8. I modified the code in
databases/postgres.py, line 365'ish to set the connection to LATIN1,
rather than UTF8. That got me over my problem.
I am posting a note in case anyone else has the same problem in the future.
A better solution might be...
line 329:
self._encoding = uri.options.get('charset', 'UTF8')
line 365:
raw_connection.set_client_encoding(self._encoding)
line 266:
statement = statement.encode(self._database._encoding)
line 282:
yield param.encode(self._database._encoding)
And add a &encoding=latin1 to your postgresql uri.
Regards
Kevin Gill
More information about the storm
mailing list