Search Postgresql Archives

Re: pymssql: Problem with Unicode string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29 January 2011 14:52, orgilhp <orgilhp@xxxxxxxxx> wrote:
> Hello!
> I am using pymssql-1.9.908. And I have MSSQL2008 database server.
> I ran following code from python 2.6:
> -----------------------------------
> Â Â Â Âimport pymssql
> Â Â Â Âconn = pymssql.connect(host='testserver', user='sa',
> password='sa', database='testdb', as_dict=True)
> Â Â Â Âcrms = conn.cursor()
> Â Â Â Âcrms.execute('SELECT cc_Name FROM tblUsers')
> Â Â Â Âfor line in crms.fetchall():
> Â Â Â Â Â Âprint 'cc_Name:', self.unicodify(line['cc_Name'])
> Â Â Â Â Â Âbreak
> Â Â Â Âcrms.close()
> -----------------------------------
> the result is-> cc_Name: ?????, ???
> But the actual data is "ÐÐÐÐÐ, ÑÐÑ" and I expect that the output would
> be "cc_Name: ÐÐÐÐÐ, ÑÐÑ".
>
> Here is my question:
> How to get Unicode data from MSSQL database using pymssql library?
>
> Any suggestion would be highly appreciated!
> regards,
> Orgil.D

This is a PostgreSQL mailing list.  Please direct this question to an
MSSQL or Python list instead.

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux