Show ISO-8859-7 Results in a site using UTF-8
Hello all, i am using Zope 2.7.0 and i get some results from SQL Server 2000 with a python module's fanction witch i call from with in a DTML Method. The data is comming encoded in ISO-8859-7 (probably due to database setup). I changed the setting of the default encoding from ZMI to ISO-8859-7 for the entiry site because of the data (temporarly) but now the same tings has to be transfered and be part of another site using UTF-8. Any help would be very nice! Thanks in advance! PS:Newbie... just tranfering myself from DTML to PT. Thomas G. Apostolou Software Engineer Θωμάς Γ. Αποστόλου Μηχανικός Λογισμικού
--On 13. Oktober 2005 13:20:07 +0300 "Thomas G. Apostolou" <thomas.info@hol.gr> wrote:
Hello all, i am using Zope 2.7.0 and i get some results from SQL Server 2000 with a python module's fanction witch i call from with in a DTML Method.
2.7.0 is old. Upgrade!
The data is comming encoded in ISO-8859-7 (probably due to database setup). I changed the setting of the default encoding from ZMI to ISO-8859-7 for the entiry site because of the data (temporarly) but now the same tings has to be transfered and be part of another site using UTF-8.
What is your question? How to migrate strings from iso-8859-7 to utf? -aj
Αρχικό μήνυμα από Andreas Jung <lists@andreas-jung.com>:
--On 13. Oktober 2005 13:20:07 +0300 "Thomas G. Apostolou" <thomas.info@hol.gr> wrote:
Hello all, i am using Zope 2.7.0 and i get some results from SQL Server 2000
with a
python module's fanction witch i call from with in a DTML Method.
2.7.0 is old. Upgrade!
The data is comming encoded in ISO-8859-7 (probably due to
database
setup). I changed the setting of the default encoding from ZMI to ISO-8859-7 for the entiry site because of the data (temporarly) but now the same tings has to be transfered and be part of another site using UTF-8.
What is your question? How to migrate strings from iso-8859-7 to utf?
-aj
Yep! How can I migrate strings from iso-8859-7 to utf-8? Is there any way to get the entire return set to utf-8? Here is my code... 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... Thomas G. Apostolou Software Engineer Θωμάς Γ. Αποστόλου Μηχανικός Λογισμικού
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
participants (3)
-
Andreas Jung -
Jens Vagelpohl -
Thomas G. Apostolou