On Tue, Dec 22, 2009 at 5:30 AM, Gijs Molenaar <[email protected]> wrote:
>
> Do you know the behavior of other db API's?
>
MSQLdb has a use_encoding keyword.
The PostgreSql Django adapter had a set_client_encoding()
method on the connection object.
The native SQLite3 Python module just returns Unicode.
>
> How big is the problem to do a manual
> conversion to unicode in your wrapper?
>
Painful--I couldn't find a good place to hook
in the code.
>
> The problem is that there isn't a real standard
> way of doing this, at least not defined by the
> python db API 2.0.
>
Yup, the PEP is encoding agnostic.
I though the path you started down was a good
idea; pass a use_unicode keyword to the connection
__init__().
Then if use_unicode = True, just decode("utf8") the
string in __strip(), otherwise leave code as is.
m
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers