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

Miguel Beltran R. yourpadre at gmail.com
Fri Jul 22 23:55:55 CEST 2016


Hi again list

After have setup my zope site and database to use ISO-8859-1, I did some
test and unfortunely it fail with javascript doing AJAX calls because the
standart says that all calls must be UTF8 nevertheless the chatset in the
page.

So now I'm changing to use UTF8, but I have another problems: the data is
stored in incorrect way.
I tried to save "test áñ" but it's stored "test áñ"

My setup
-Windows 7
-Zope 2.13.23
-MS Sql server 2008


--zope.conf
rest-input-encoding utf-8
rest-output-encoding utf-8
default-zpublisher-encoding utf-8

--python file site.py
encoding = "utf-8"

--html header
<meta http-equiv="content-type" content="text/html; charset=utf-8">


The pages
* index_html (dtml-document)
containt the html FORM

*estado.html ( dtml-method)
according to a field from the FORM, it call differents pages, in this case
to "agregar.html"

* agregar.html (dtml-document)
recive the data and call the Zsql (agrega_credencial)

* agrega_credencial (zsql method)
 "insert into credencial (nombre) values ( N'<dtml-sqlvar credencial
type="nb">')"

--MS SQL Server
the fields are nvarchar

--SQL Server management (admin tool)
here is were I see that the data is stored like "test áñ",


but even if I use the agrega_credencial (zsql method) using the ZMI the
data is not saved correctly.

What do I need to use UTF8 in my setup? What I'm missing?



________________________________________
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/20160722/f05aa302/attachment.html>


More information about the Zope mailing list