adodbapi / string encoding problem
aleax at aleax.it
Fri Sep 26 12:28:48 CEST 2003
Achim Domma wrote:
> "Peter Otten" <__peter__ at web.de> wrote in message
> news:bkumfg$ifj$01$1 at news.t-online.com...
>> You have to know the encoding of the original file.
> Why? It's of type 'str' and I would expect that I could write it to DB and
> get the same 'str' back. That's all I want. Why is it required do know the
Because the Access engine (actually known as Microsoft Jet: "Access" is
only, strictly a *FRONT-END* product -- marketing terminology confusion)
stores all text strings as Unicode; and COM (thus ADO) also uses Unicode
exclusively for all text strings (as a rule). If you cannot move to
better engines and interfaces, you're stuck with the ones you have...
(99 times out of 100, moving to better engines and interfaces -- e.g.
SQLite and PySQLite, or Firebird, etc, is preferable from most points
of view -- but 1% of the time one must keep supporting legacy code...).
More information about the Python-list