Darren Mansell wrote:Thanks for the help. Unfortunately pyodbc seems to only work on Windows.Hi.
I'm relatively new to python so please be gentle :)
I'm trying to write a £ symbol to an MS SQL server using pymsssql .. This
works but when selecting the data back (e.g. using SQL management
studio) the £ symbol is replaced with £ (latin capital letter A with
circumflex).
This is a bit of a non-answer but... use pyodbc[*],
use NVARCHAR cols, and use unicode values on insert:
I need to connect to the SQL server from a Linux box.
The db schema is very set in stone, I can't do anything with it. I'm
currently opening autogenerated SQL scripts, decoding them from utf-16
and then back into utf-8 for pymssql to run them.
It's been working great for ages until someone noticed the £ symbols had
this extra character in there..
--
Darren Mansell <da************@opengi.co.uk>