UTF-8 problem with zope2.10 and postgresql

View: New views
17 Messages — Rating Filter:   Alert me  

Parent Message unknown UTF-8 problem with zope2.10 and postgresql

by Claire Boussard-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm trying to upgrade my applications from debian sarge
to debian lenny, so from zope2.7 to zope2.10.

I've decided to have all in UTF-8 in my new server,
which is the default for lenny, for postgresql also.

The situation now is :
In the database, all is OK
If I create a ZSQL method (say sql_candidat) in the ZMI and test it, all
is OK (example firstname : Andrée)
If I create a dtml method, loop over my ZSQL method, and print
the firstname, it's messed up.

Example dtml:
<dtml-in sql_candidat>
  <dtml-var firstname>
</dtml-in>

The result in the browser is : Andrée

A contrario :
In the page
<input type="text" size="20" name="firstname:utf8:ustring"
In the browser, I type Andrée, I click on submit, the data are saved through
another ZSQL method (UPDATE SQl statement) and all is OK in
the database

In zope.conf:
locale fr_FR.utf8
rest-input-encoding utf-8
rest-output-encoding utf-8
rest-language-code fr
default-zpublisher-encoding utf-8

In the HTML page
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

The HTTP header (with liveHTTPheader in firefox) is correct :
Content-Type: text/html; charset=utf-8


Any idea ?

Claire Boussard.
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andreas Jung-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am 06.11.09 17:40, schrieb Claire Boussard:
>
> In the HTML page
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>  
The ZPublisher does not care about that. You may set the content-type
explictly as HTTP header and not through http-equiv by calling

RESPONSE.setHeader(key, value)

(no idea how to do that using the ancient technology DTML).

-aj

[lists.vcf]

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:info@...
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard



_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Jonathan (dev101) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


----- Original Message -----
From: "Andreas Jung" <lists@...>
To: "Claire Boussard" <claibous2@...>
Cc: "zope" <zope@...>
Sent: Friday, November 06, 2009 12:47 PM
Subject: Re: [Zope] UTF-8 problem with zope2.10 and postgresql


> Am 06.11.09 17:40, schrieb Claire Boussard:
>>
>> In the HTML page
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>>  
> The ZPublisher does not care about that. You may set the content-type
> explictly as HTTP header and not through http-equiv by calling
>
> RESPONSE.setHeader(key, value)
>
> (no idea how to do that using the ancient technology DTML).


<dtml-call "RESPONSE.setHeader('Content-Type','text/html; charset=UTF-8')">

DTML:  Mature, stable, reliable.


Jonathan
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andreas Jung-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am 06.11.09 19:00, schrieb Jonathan (dev101):

> ----- Original Message -----
> From: "Andreas Jung" <lists@...>
> To: "Claire Boussard" <claibous2@...>
> Cc: "zope" <zope@...>
> Sent: Friday, November 06, 2009 12:47 PM
> Subject: Re: [Zope] UTF-8 problem with zope2.10 and postgresql
>
>
>  
>> Am 06.11.09 17:40, schrieb Claire Boussard:
>>    
>>> In the HTML page
>>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>>>  
>>>      
>> The ZPublisher does not care about that. You may set the content-type
>> explictly as HTTP header and not through http-equiv by calling
>>
>> RESPONSE.setHeader(key, value)
>>
>> (no idea how to do that using the ancient technology DTML).
>>    
>
> <dtml-call "RESPONSE.setHeader('Content-Type','text/html; charset=UTF-8')">
>
> DTML:  Mature, stable, reliable.
>  
Technology for dinosaurs :-)

SCNR
Andreas

[lists.vcf]

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:info@...
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard



_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andrew Milton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+-------[ Jonathan (dev101) ]----------------------
|
| ----- Original Message -----
| From: "Andreas Jung" <lists@...>
| To: "Claire Boussard" <claibous2@...>
| Cc: "zope" <zope@...>
| Sent: Friday, November 06, 2009 12:47 PM
| Subject: Re: [Zope] UTF-8 problem with zope2.10 and postgresql
|
|
| > Am 06.11.09 17:40, schrieb Claire Boussard:
| >>
| >> In the HTML page
| >> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| >>  
| > The ZPublisher does not care about that. You may set the content-type
| > explictly as HTTP header and not through http-equiv by calling
| >
| > RESPONSE.setHeader(key, value)
| >
| > (no idea how to do that using the ancient technology DTML).
|
|
| <dtml-call "RESPONSE.setHeader('Content-Type','text/html; charset=UTF-8')">
|
| DTML:  Mature, stable, reliable.

+ predictable...

--
Andrew Milton
akm@...
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andrew Milton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+-------[ Andreas Jung ]----------------------
| Am 06.11.09 19:00, schrieb Jonathan (dev101):
| > ----- Original Message -----
| > From: "Andreas Jung" <lists@...>
| > To: "Claire Boussard" <claibous2@...>
| > Cc: "zope" <zope@...>
| > Sent: Friday, November 06, 2009 12:47 PM
| > Subject: Re: [Zope] UTF-8 problem with zope2.10 and postgresql
| >
| >
| >  
| >> Am 06.11.09 17:40, schrieb Claire Boussard:
| >>    
| >>> In the HTML page
| >>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| >>>  
| >>>      
| >> The ZPublisher does not care about that. You may set the content-type
| >> explictly as HTTP header and not through http-equiv by calling
| >>
| >> RESPONSE.setHeader(key, value)
| >>
| >> (no idea how to do that using the ancient technology DTML).
| >>    
| >
| > <dtml-call "RESPONSE.setHeader('Content-Type','text/html; charset=UTF-8')">
| >
| > DTML:  Mature, stable, reliable.
| >  
| Technology for dinosaurs :-)

Takes an extinction level event to wipe out dinosaurs... as opposed to a
bit of a heat increase for lowly mammals d8)

--
Andrew Milton
akm@...
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Garry Saddington :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrew Milton wrote:

> +-------[ Andreas Jung ]----------------------
> | Am 06.11.09 19:00, schrieb Jonathan (dev101):
> | > ----- Original Message -----
> | > From: "Andreas Jung" <lists@...>
> | > To: "Claire Boussard" <claibous2@...>
> | > Cc: "zope" <zope@...>
> | > Sent: Friday, November 06, 2009 12:47 PM
> | > Subject: Re: [Zope] UTF-8 problem with zope2.10 and postgresql
> | >
> | >
> | >  
> | >> Am 06.11.09 17:40, schrieb Claire Boussard:
> | >>    
> | >>> In the HTML page
> | >>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> | >>>  
> | >>>      
> | >> The ZPublisher does not care about that. You may set the content-type
> | >> explictly as HTTP header and not through http-equiv by calling
> | >>
> | >> RESPONSE.setHeader(key, value)
> | >>
> | >> (no idea how to do that using the ancient technology DTML).
> | >>    
> | >
> | > <dtml-call "RESPONSE.setHeader('Content-Type','text/html; charset=UTF-8')">
> | >
> | > DTML:  Mature, stable, reliable.
> | >  
> | Technology for dinosaurs :-)
>
> Takes an extinction level event to wipe out dinosaurs... as opposed to a
> bit of a heat increase for lowly mammals d8)
>

I've always been amused by this 'outdated' technology thing, with
respect to dtml. Someone had better tell Linus to change his programming
language for the kernel, it's getting a bit old by now. How about c#,
that should do it.
Garry
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Chris Withers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Garry Saddington wrote:
> I've always been amused by this 'outdated' technology thing, with
> respect to dtml. Someone had better tell Linus to change his programming
> language for the kernel, it's getting a bit old by now. How about c#,
> that should do it.

Comparing C and DTML is pretty rediculous.

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by M.J. Pieters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/6 Garry Saddington <garry@...>:
> I've always been amused by this 'outdated' technology thing, with
> respect to dtml. Someone had better tell Linus to change his programming
> language for the kernel, it's getting a bit old by now. How about c#,
> that should do it.

It's a question of resources and maintainability. Few people have the
time or the inclination to keep DTML going. Ergo, it'll die and we let
you know so you can migrate away from it.

--
Martijn Pieters
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Allen Schmidt Sr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well if DTML ever is taken out of a Zope release, that will be the end of Zope for us, and others I am sure. It's all we've used for almost 10 years now and serves us very well.

Martijn Pieters wrote:
2009/11/6 Garry Saddington garry@...:
  
I've always been amused by this 'outdated' technology thing, with
respect to dtml. Someone had better tell Linus to change his programming
language for the kernel, it's getting a bit old by now. How about c#,
that should do it.
    

It's a question of resources and maintainability. Few people have the
time or the inclination to keep DTML going. Ergo, it'll die and we let
you know so you can migrate away from it.

  

_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Garry Saddington :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chris Withers wrote:

> Garry Saddington wrote:
>> I've always been amused by this 'outdated' technology thing, with
>> respect to dtml. Someone had better tell Linus to change his
>> programming language for the kernel, it's getting a bit old by now.
>> How about c#, that should do it.
>
> Comparing C and DTML is pretty rediculous.
>
> Chris
>

It wasn't a comparison, it was a 'ridiculous' tongue in cheek analogy.
There are plenty more if you would like;-) The point is that stating
something is old or outdated is not a reason to prove its utility or
otherwise.
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andrew Milton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+-------[ Martijn Pieters ]----------------------
|  
|  2009/11/6 Garry Saddington <garry@...>:
| > I've always been amused by this 'outdated' technology thing, with
| > respect to dtml. Someone had better tell Linus to change his programming
| > language for the kernel, it's getting a bit old by now. How about c#,
| > that should do it.
|
| It's a question of resources and maintainability. Few people have the
| time or the inclination to keep DTML going. Ergo, it'll die and we let
| you know so you can migrate away from it.

More likely, someone spiteful will deliberately break it or simply
remove it between releases without notice, that seems to be the "Zope
Way"

--
Andrew Milton
akm@...
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andreas Jung-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am 06.11.09 22:16, schrieb Allen Schmidt Sr.:
> Well if DTML ever is taken out of a Zope release, that will be the end
> of Zope for us, and others I am sure.
There are no plans for taking DTML out of Zope. But there are also no
plans for keeping you away from
using DTML :-) ZPT is the way to go...if you you are using DTML then
your own pain, risk and pleasure.

Andreas


[lists.vcf]

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:info@...
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard



_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Tres Seaver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Milton wrote:

> +-------[ Martijn Pieters ]----------------------
> |  
> |  2009/11/6 Garry Saddington <garry@...>:
> | > I've always been amused by this 'outdated' technology thing, with
> | > respect to dtml. Someone had better tell Linus to change his programming
> | > language for the kernel, it's getting a bit old by now. How about c#,
> | > that should do it.
> |
> | It's a question of resources and maintainability. Few people have the
> | time or the inclination to keep DTML going. Ergo, it'll die and we let
> | you know so you can migrate away from it.
>
> More likely, someone spiteful will deliberately break it or simply
> remove it between releases without notice, that seems to be the "Zope
> Way"

Really?  When have we deliberately broken stuff between releases without
notice?  We've been pretty damned careful about BBB issues, AFAIK.



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver@...
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkr18KQACgkQ+gerLs4ltQ4qNACfeBGq7mvT8wdSdNWM4fKHuaBJ
yjQAoKxis7aBSuJUqckLQve7WwZPpWOM
=6NoB
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andreas Jung-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am 07.11.09 23:11, schrieb Tres Seaver:

> Andrew Milton wrote:
> > +-------[ Martijn Pieters ]----------------------
> > |  
> > |  2009/11/6 Garry Saddington <garry@...>:
> > | > I've always been amused by this 'outdated' technology thing, with
> > | > respect to dtml. Someone had better tell Linus to change his
> programming
> > | > language for the kernel, it's getting a bit old by now. How
> about c#,
> > | > that should do it.
> > |
> > | It's a question of resources and maintainability. Few people have the
> > | time or the inclination to keep DTML going. Ergo, it'll die and we let
> > | you know so you can migrate away from it.
>
> > More likely, someone spiteful will deliberately break it or simply
> > remove it between releases without notice, that seems to be the "Zope
> > Way"
>
> Really?  When have we deliberately broken stuff between releases without
> notice?  We've been pretty damned careful about BBB issues, AFAIK.
Absolutely right.

Andreas

[lists.vcf]

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:info@...
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard



_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by Andrew Milton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+-------[ Tres Seaver ]----------------------
| -----BEGIN PGP SIGNED MESSAGE-----
| Hash: SHA1
|
| Andrew Milton wrote:
| > +-------[ Martijn Pieters ]----------------------
| > |  
| > |  2009/11/6 Garry Saddington <garry@...>:
| > | > I've always been amused by this 'outdated' technology thing, with
| > | > respect to dtml. Someone had better tell Linus to change his programming
| > | > language for the kernel, it's getting a bit old by now. How about c#,
| > | > that should do it.
| > |
| > | It's a question of resources and maintainability. Few people have the
| > | time or the inclination to keep DTML going. Ergo, it'll die and we let
| > | you know so you can migrate away from it.
| >
| > More likely, someone spiteful will deliberately break it or simply
| > remove it between releases without notice, that seems to be the "Zope
| > Way"
|
| Really?  When have we deliberately broken stuff between releases without
| notice?  We've been pretty damned careful about BBB issues, AFAIK.

I don't really want to fill up an email with a litany of stuff, I'm
sure many people have their own pet-peeves about stuff being axed out,
but, I'll give you one.

PageTemplateFile stops Zope from starting if the file they refer to
does not exist, rather than the 'at-access-time' error they used to
generate. When you have place holder code and templates in abstract
base-classes, this sucks the big one let me tell you.

--
Andrew Milton
akm@...
_______________________________________________
Zope maillist  -  Zope@...
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 )

Re: UTF-8 problem with zope2.10 and postgresql

by M.J. Pieters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/8 Andrew Milton <akm@...>:
> PageTemplateFile stops Zope from starting if the file they refer to
> does not exist, rather than the 'at-access-time' error they used to
> generate. When you have place holder code and templates in abstract
> base-classes, this sucks the big one let me tell you.

I don't know why or what changed there, but have you considered that
this could be a bug? It sounds as if you have a legitimate usecase
there, at least something you could argue convincingly about.

--
Martijn Pieters
_______________________________________________
Zope maillist  -  Zope@...
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 )