Question: We accept the accented characters such as `Ḿấxiḿứś` from a html form, when using hibernate saves it into the database the string becomes `??xi???`

Then I did a SQL update, trying to write the accented words directly into the database, the same result happened.

The desired behavior is to set into the dabase as what it is.

I am using Microsoft SQL Server 2008. 

I have tried to google it, someone said I need to change the database collation to `SQL_Latin1_General_CP1_CI_AI`. But I can't find this options from the dropdown.

Answer: 
Only one of these works: nvarchar datatype and N prefix for unicode constants.

```
DECLARE 
    @foo1 varchar(10) = 'Ḿấxiḿứś', 
    @foo2 varchar(10) = N'Ḿấxiḿứś', 
    @fooN1 nvarchar(10) = 'Ḿấxiḿứś', 
    @fooN2 nvarchar(10) = N'Ḿấxiḿứś';

SELECT @foo1, @foo2, @fooN1, @fooN2;

```

You have to ensure that all datatypes are nvarchar end to end (columns, parameters, etc)

Collation is not the issue: this is for sorting and comparison for nvarchar
```
ALTER TABLE "tablename"

Alter COLUMN "columnname" nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS

```