[egenix-users] Zope, MySQL, UTF-8

Jan Stiller Jan.Stiller at hagen-partner.de
Mon Feb 14 18:37:51 CET 2005


Charlie Clark wrote:

>On 2005-02-14 at 17:34:05 [+0100], Jan Stiller 
><Jan.Stiller at hagen-partner.de> wrote:
>  
>
>>We have many many ZSQLs and we wouldn't like to rewrite all their
>>callees - your (btw fine) product surely has one single place, where
>>connections are made. Is it possible to make a 'SET CHARACTER SET'-call
>>right after the creation of the connection or do I have to repeat this
>>every time?
>>    
>>
>
>Not currently unfortunately. The best thing for you might be to hack your 
>ZSQL-Product to allow you to do this. Sorry for this but Zope and RDBMS has 
>been sorely neglected for many years in favour of "do everything in ZODB". 
>I have started work on a different approach to ZSQLs which would make 
>support for this kind of thing a lot easier but as ZSQLs currently ignore 
>parameter passing (check the source) and require the DA to create single 
>SQL statements our hands are kind of tied.
>
>By the way, have you had any success reading unicode from your database? I 
>remember that I couldn't get this to render in Zope having to read in 
>Latin-1 and convert in a PythonScript.
>
>Good luck!
>
>Charlie
>  
>
Hi

I'm not sure if you mean this (Unicode ?= UTF8), but:

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
in the HTML-Header

and the above mentionened addition to the dsn was all I had to do...

Surprisingly you even don't seem to have patch your site.py - hmm

hope this helps


I have another Question:
We might migrate to PostgreSQL or even MSSQL - do you have heard of any 
Unicode related problems with these db's? (I don't think that MySQL's 
STMT is standard)

ciao
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20050214/922bcabc/attachment-0139.htm


More information about the egenix-users mailing list