I have some trouble with the 7.4.1 version about the string conversion in many scripts afetr upgrading my server
My scripts was ok in 7.3.3 b570
I have some error in 7.4.1 when :
- str() is executed on a string variable
- when sql query return characters such as ‘ê’ or ‘é’
see the following example executed in the script playground:
def htmlInfoPae(id_pae):
import app.commun
import system
table = system.db.runPrepQuery("SELECT * from VUE_PAE_TERRITOIRE where id_pae=?",[id_pae],dbfrontal)
html = "<HTML><HEAD><TITLE>PAE : " + str(id_pae) + "</TITLE></HEAD><BODY>"
if len(table)==1:
html = html + "PAE : " + str(id_pae) + "<BR>¤"
[b]html = html + "Commune : " + table[0]["COMMUNE"] + "<BR>"[/b]
html = html + "</BODY></HTML>"
else:
html = html + "PAE : " + str(id_pae) + "<BR><BR>Pas de détail ???"+ "</BODY></HTML>"
return (html)
import sys
#print sys.getdefaultencoding()
#print "¤" + " téêst " + "¤"
print htmlInfoPae(1)
the error message (for the line in bold)