<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">2016-07-22 16:55 GMT-05:00 Miguel Beltran R. <span dir="ltr"><<a href="mailto:yourpadre@gmail.com" target="_blank">yourpadre@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div><div><div><div><div>* agrega_credencial (zsql method)<br> "insert into credencial (nombre) values ( N'<dtml-sqlvar credencial type="nb">')"<br><br></div><br></div></div></div></div></div></blockquote></div><br><br><br>I did some changes to the zsql method to<br></div><div class="gmail_extra">"insert into credencial (nombre) values (N<dtml-sqlvar "scripts.txt__py(credencial)" type="nb">)<br><br></div><div class="gmail_extra">where scripts is a folder object, and txt__py is a python script object<br><br></div><div class="gmail_extra">-- txt__py (parameter s)<br>try:<br> if s == None:<br> u=u''<br> elif same_type(s,''):<br> try:<br> u=s.decode('utf-8')<br> except UnicodeDecodeError:<br> u=s <br> elif same_type(s,u''):<br> u=s<br> else:<br> u='data not valid type'<br>except Exception, e:<br> return "error decoding"<br><br><br></div><div class="gmail_extra">After this change it's working like I expect. The idea came from here (1).<br></div><div class="gmail_extra">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?<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br>(1) <a href="http://pgbovine.net/unicode-python.htm">http://pgbovine.net/unicode-python.htm</a><br><br> <div class="gmail_signature">________________________________________<br>Lo bueno de vivir un dia mas<br>es saber que nos queda un dia menos de vida</div>
</div></div>