Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

UTF-8 problem with zope2.10 and postgresql

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


claibous2 at free

Nov 6, 2009, 8:40 AM

Post #1 of 17 (650 views)
Permalink
UTF-8 problem with zope2.10 and postgresql

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[at]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 )


lists at zopyx

Nov 6, 2009, 9:47 AM

Post #2 of 17 (622 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

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
Attachments: lists.vcf (0.32 KB)


dev101 at magma

Nov 6, 2009, 10:00 AM

Post #3 of 17 (622 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

----- Original Message -----
From: "Andreas Jung" <lists[at]zopyx.com>
To: "Claire Boussard" <claibous2[at]free.fr>
Cc: "zope" <zope[at]zope.org>
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[at]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 )


lists at zopyx

Nov 6, 2009, 10:04 AM

Post #4 of 17 (622 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

Am 06.11.09 19:00, schrieb Jonathan (dev101):
> ----- Original Message -----
> From: "Andreas Jung" <lists[at]zopyx.com>
> To: "Claire Boussard" <claibous2[at]free.fr>
> Cc: "zope" <zope[at]zope.org>
> 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
Attachments: lists.vcf (0.31 KB)


akm at theinternet

Nov 6, 2009, 10:04 AM

Post #5 of 17 (622 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

+-------[ Jonathan (dev101) ]----------------------
|
| ----- Original Message -----
| From: "Andreas Jung" <lists[at]zopyx.com>
| To: "Claire Boussard" <claibous2[at]free.fr>
| Cc: "zope" <zope[at]zope.org>
| 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[at]theinternet.com.au
_______________________________________________
Zope maillist - Zope[at]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 )


akm at theinternet

Nov 6, 2009, 10:06 AM

Post #6 of 17 (622 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

+-------[ Andreas Jung ]----------------------
| Am 06.11.09 19:00, schrieb Jonathan (dev101):
| > ----- Original Message -----
| > From: "Andreas Jung" <lists[at]zopyx.com>
| > To: "Claire Boussard" <claibous2[at]free.fr>
| > Cc: "zope" <zope[at]zope.org>
| > 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[at]theinternet.com.au
_______________________________________________
Zope maillist - Zope[at]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 )


garry at schoolteachers

Nov 6, 2009, 12:52 PM

Post #7 of 17 (612 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

Andrew Milton wrote:
> +-------[ Andreas Jung ]----------------------
> | Am 06.11.09 19:00, schrieb Jonathan (dev101):
> | > ----- Original Message -----
> | > From: "Andreas Jung" <lists[at]zopyx.com>
> | > To: "Claire Boussard" <claibous2[at]free.fr>
> | > Cc: "zope" <zope[at]zope.org>
> | > 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[at]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 )


chris at simplistix

Nov 6, 2009, 1:04 PM

Post #8 of 17 (612 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

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[at]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 )


mj at zopatista

Nov 6, 2009, 1:10 PM

Post #9 of 17 (612 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

2009/11/6 Garry Saddington <garry[at]schoolteachers.co.uk>:
> 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[at]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 )


aschmidt at fredericksburg

Nov 6, 2009, 1:16 PM

Post #10 of 17 (612 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

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[at]schoolteachers.co.uk>:
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.


garry at schoolteachers

Nov 6, 2009, 1:29 PM

Post #11 of 17 (613 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

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[at]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 )


akm at theinternet

Nov 6, 2009, 6:44 PM

Post #12 of 17 (607 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

+-------[ Martijn Pieters ]----------------------
|
| 2009/11/6 Garry Saddington <garry[at]schoolteachers.co.uk>:
| > 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[at]theinternet.com.au
_______________________________________________
Zope maillist - Zope[at]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 )


lists at zopyx

Nov 6, 2009, 9:13 PM

Post #13 of 17 (607 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

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
Attachments: lists.vcf (0.31 KB)


tseaver at palladion

Nov 7, 2009, 2:11 PM

Post #14 of 17 (591 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

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

Andrew Milton wrote:
> +-------[ Martijn Pieters ]----------------------
> |
> | 2009/11/6 Garry Saddington <garry[at]schoolteachers.co.uk>:
> | > 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[at]palladion.com
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[at]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 )


lists at zopyx

Nov 7, 2009, 10:37 PM

Post #15 of 17 (582 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

Am 07.11.09 23:11, schrieb Tres Seaver:
> Andrew Milton wrote:
> > +-------[ Martijn Pieters ]----------------------
> > |
> > | 2009/11/6 Garry Saddington <garry[at]schoolteachers.co.uk>:
> > | > 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
Attachments: lists.vcf (0.31 KB)


akm at theinternet

Nov 7, 2009, 11:57 PM

Post #16 of 17 (582 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

+-------[ Tres Seaver ]----------------------
| -----BEGIN PGP SIGNED MESSAGE-----
| Hash: SHA1
|
| Andrew Milton wrote:
| > +-------[ Martijn Pieters ]----------------------
| > |
| > | 2009/11/6 Garry Saddington <garry[at]schoolteachers.co.uk>:
| > | > 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[at]theinternet.com.au
_______________________________________________
Zope maillist - Zope[at]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 )


mj at zopatista

Nov 8, 2009, 4:16 AM

Post #17 of 17 (582 views)
Permalink
Re: UTF-8 problem with zope2.10 and postgresql [In reply to]

2009/11/8 Andrew Milton <akm[at]theinternet.com.au>:
> 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[at]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 )

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.