Django <-> SQL Server 2005, text encoding problem

前端 未结 3 1831
轮回少年
轮回少年 2021-01-13 02:46

I\'m trying to store Django data on MS SQL Server 2005 using:

http://code.google.com/p/django-pyodbc/ (pyodbc + FreeTDS)

As long as I\'m storing string consi

3条回答
  •  被撕碎了的回忆
    2021-01-13 02:57

    We use Django with SQL Server 2005. We found the same problem you did.

    What ODBC driver are you using? FreeTDS?

    We tried finding a good ODBC driver for linux/unix to use that would not throw the error above (and others) when unicode would come into play - and failed miserably. None of the drivers we tested - at least three, I can dig the names up if you would like - had any success in dealing with unicode strings via django-pyodbc.

    What we ended up doing, sad as it might sound, was to decide to run Django on a Windows server (Apache + mod_wsgi) and use the Microsoft's SQL Native ODBC driver.

    It works just fine - unicode wise - when we do that.

提交回复
热议问题