I\'ve generated an md5 hash as below:
DECLARE @varchar varchar(400)
SET @varchar = \'è\'
SELECT CONVERT(VARCHAR(2000), HASHBYTES( \'MD5\', @varchar ), 2)
SQL Server uses UCS-2 rather than UTF-8 to encode character data.
If you were using an NVarChar field, the following would work:
System.Text.Encoding.Unicode.GetBytes("è"); // Updated per @srutzky's comments
For more information on SQL and C# hashing, see
http://weblogs.sqlteam.com/mladenp/archive/2009/04/28/Comparing-SQL-Server-HASHBYTES-function-and-.Net-hashing.aspx