Re: Cannot send UTF-8 chars to MSSQL 2008

Niklas Lampén <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
> > 1> UPDATE Mod_Texts SET ContentData='foo Найти' WHERE ContentId=6824;
> > 2> SELECT ContentData FROM Mod_Texts WHERE ContentId=6824;
> > 3> GO
> > ContentData
> > foo ?????
> 
> Is that field even capable of storing Cyrillic letters?

Yes, it is. The field is NVARCHAR and if I use Microsoft SQL Server Management Studio, I can insert that string in it and fetch it correctly with FreeTDS.

> It's possible it's not an NTEXT field and the server isn't set to use a
> Cyrillic single-byte character set.

SQL Server's 'sp_server_info' says that COLLATION_SEQ is 'charset=iso_1 collation=Finnish_Swedish_CI_AS', which looks bad for this situation. But isn't all data stored as UCS2 in MSSQL and therefore it should be able to store those Cyrillic letters? And yet again, I can store 'foo Найти' in the field using Management Studio.

Is there a way to force FreeTDS to think that MSSQL Server is not ISO_1 but UCS2 or UTF-8 or something else? I would be happy to try to change some lines of code and recompile if someone just told me which lines to change.


Niklas
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.