14 Oct
2005
14 Oct
'05
8:38 a.m.
On 14 Oct 2005, at 09:14, Thomas G. Apostolou wrote:
def GetData(self, sysDSN="aVoiSys", usr="sa", mypass="atsql2k", sTable="trdt", sFields="*"): id = self.id import dbi import odbc connection=odbc.odbc(sysDSN+'/'+usr+'/'+mypass) cur=connection.cursor() sSQL='Select '+sFields+' from '+sTable cur.execute(sSQL) data=cur.fetchall() cur.close() connection.close() return data
Is there any way to return the "data" encoded in utf-8? It is coming as ISO-8859-7 from an SQL2K Server...
utf8_string = unicode(iso_8859_7_string, 'iso-8859-7').encode('utf-8') jens