> > There isn't a reason to assume that strings use any other encoding, > > either. > > Isn't that what sys.{get,set}defaultencoding is for? If that is all you want to support, then: def dump_string(self, value, escape=escape): if unicode: self.dump_unicode(unicode(value), escape) else: self.write("<value><string>%s</string></value>\n" % escape(value)) dispatch[StringType] = dump_string If you have changed the default encoding (not recommended) then everything should work fine. > So perhaps it would be better to change the postgresql-modules to return > unicode-objects instead of strings? Maybe. Cheers, Brian
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4