[Zope] Zope 2.13 + MS SQL Server 2008 + UTF8

Miguel Beltran R. yourpadre at gmail.com
Mon Jul 25 22:53:35 CEST 2016

2016-07-22 16:55 GMT-05:00 Miguel Beltran R. <yourpadre at 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)
   if s == None:
   elif same_type(s,''):
      except UnicodeDecodeError:
   elif same_type(s,u''):
      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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.zope.org/pipermail/zope/attachments/20160725/e2ea0ecc/attachment.html>

More information about the Zope mailing list