2016-07-22 16:55 GMT-05:00 Miguel Beltran R. <yourpa...@gmail.com>: > > * agrega_credencial (zsql method) > "insert into credencial (nombre) values ( N'<dtml-sqlvar credencial > type="nb">')" > > >
I did some changes to the zsql method to "insert into credencial (nombre) values (N<dtml-sqlvar "scripts.txt__py(credencial)" type="nb">) where scripts is a folder object, and txt__py is a python script object -- txt__py (parameter s) try: if s == None: u=u'' elif same_type(s,''): try: u=s.decode('utf-8') except UnicodeDecodeError: u=s elif same_type(s,u''): u=s else: u='data not valid type' except Exception, e: return "error decoding" After this change it's working like I expect. The idea came from here (1). now the question, what it's the scope of the settings in the zope.conf file where the enconding is set? it only affect html page render? (1) http://pgbovine.net/unicode-python.htm ________________________________________ Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida
_______________________________________________ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )