I want to add a French word similar Catégoriesin my table, p EncryptByKey. Here is my request:
Catégories
EncryptByKey
OPEN SYMMETRIC KEY SymmetricKey1 DECRYPTION BY CERTIFICATE Certificate1; insert into tbl_Name (Name) values (EncryptByKey( Key_GUID('SymmetricKey1'), CONVERT(Nvarchar,'Catégories')))
but when I get the value with the following query, I got 慃㽴潧楲獥insteadCatégories
慃㽴潧楲獥
OPEN SYMMETRIC KEY SymmetricKey1 DECRYPTION BY CERTIFICATE Certificate1; SELECt CONVERT(NVARCHAR(max),DECRYPTBYKEY(Name)) as Name from tbl_Name
could you help me?
Write French words with the prefix " N" to mark the string as Unicode and then encrypt:
N
insert into tbl_Name (Name) values (EncryptByKey( Key_GUID('SymmetricKey1'), N'Catégories'))
, , UNICODE. , , , , , , , , .
:
OPEN SYMMETRIC KEY SymmetricKey1 DECRYPTION BY CERTIFICATE Certificate1; insert into tbl_Name (Name) values (EncryptByKey( Key_GUID('SymmetricKey1'), N'Catégories'))
N , Unicode .