[egenix-users] UTF-8 problem
Charlie Clark
charlie at egenix.com
Wed Jun 8 20:31:07 CEST 2005
On 2005-06-08 at 19:17:46 [+0200], Martin Winkler <mw at agami.at> wrote:
> On Wed, 2005-06-08 at 17:39 +0200, Charlie Clark wrote:
> >
> > How does this work at the Python level? I think that Zope might be the
> > problem here.
>
> We are using the same forms, python scripts, zsql methods with a
> zpsycopgda-connected Postgresql, and it works perfectly there.
But that isn't quite the same thing which is why I suggest you try the
statements at the Python level.
> So Zope isn't the problem - at least in *this* case ;-)
>
> I suspect that the mxodbc changes the utf8-characters to something else
> somewhere in the middle when inserting the data into the database.
That will depend entirely on the database but if anything mxODBC tends to
do the right thing (tm) and may convert where other drivers don't.
> Is there any conversion being made inside mxodbc? If so, how can I
> change that behaviour from Zope-level? (creating Zope Products is no
> problem for me)
If you check the documentation for mxODBC you'll find information on
dealing with specific encodings.
***
.encoding
Read/write attribute which defines the encoding to use for converting
Unicode to 8-bit strings and vice-versa. If set to None (default), Python's
default encoding will be used, otherwise it has to be a string providing a
valid encoding name, e.g. 'latin-1' or 'utf-8'.
Charlie
More information about the egenix-users
mailing list