Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cyrillic alphabet with Microsoft SQL Server Management Studio

I am using SQL Server database, and I need to store some texts written using Cyrillic alphabet.

I use Microsoft SQL Server Management Studio to enter, view and manipulate data. But when I insert data like

Insert into EBook (TitleID, Title, ContentFile) 
values (N'титул', N'король голый', N'чего-то там еще');

and then do SELECT, I see only ???? instead of the texts.

I don't even know whether the data was stored incorrectly, or the Studio cannot correctly display it. How can this be fixed?

like image 436
David Shochet Avatar asked Nov 17 '11 22:11

David Shochet


Video Answer


1 Answers

What datatype are those columns??

In order to store e.g. Cyrillic characters, they must be nvarchar(x)

I see the exact same phenomenom: with varchar(100) the data goes in fine but comes out as nothing but questions marks ??????? - but with nvarchar(100) everything is fine.

like image 110
marc_s Avatar answered Oct 16 '22 03:10

marc_s