Unicode characters in Sql table

I am using Sql Server 2008 R2 Enterprise. I am encoding an application that is able to insert, update, delete and select records from Sql tables. The app makes mistakes when it comes to entries that contain special characters, such as ć, č š, đ and ž.

Here's what happens:

Team:

INSERT INTO Account (Name, Person) 
VALUES ('Boris Borenović', 'True') 
WHERE Id = '1'

inserts a new record, but the Name field Boris Borenovic, so the character ćchanges to c.

Team:

SELECT * FROM Account 
WHERE Name = 'Boris Borenović'

returns the correct entry, so the character ćis replaced with c, and the entry is returned.

Questions:

  • Can Sql Server save ćother special characters mentioned earlier?
  • Is it possible if the previous question is resolved to force Sql to return the record Boris Borenović, even if the request requests Boris Borenovic?

, , Sql , , , . .

+5
2

1) , nvarchar, varchar ( nchar char)

2) N' , , . N'Boris Borenović'

3) (, ADO.Net), Unicode, nvarchar/nchar varchar/char

4) , COLLATE . :.

SELECT * FROM Account 
WHERE Name = 'Boris Borenovic' COLLATE Latin1_General_CI_AI

_CI_AI " ", " ", "c" .

5) UNIQUE/PK, , " ", " ", COLLATE , "_AS" , , .

+12

SQL Server , nvarchar varchar .

accent-insensitve, C:

WHERE Name = 'Boris Borenović' COLLATE Cyrillic_General_CI_AI

CI AS Accent Insensitive.

+1

All Articles