title: Mssql encoding problem with special characters
body: <p>We are using the node-mssql package to insert into and read out of our azure mssql database.
  The database is very simple, because it is just used as a key/value cache, where the value can be quite long and also contain special characters.</p>
  <p>DB Schema:</p>
  <pre><code>create table cache
  (
      id       int identity
          constraint cache_pk
              primary key nonclustered,
      cacheKey varchar(500),
      ttl      bigint,
      value    varchar(max)
  )
  go
  
  create index cache_cacheKey_index
      on cache (cacheKey desc)
  go
  
  create index cache_ttl_index
      on cache (ttl)
  go
  </code></pre>
  <p>For some reason, when I insert values into &quot;value&quot;, some special characters are not treated well.</p>
  <pre><code>Dash – example
  </code></pre>
  <p>turns into:</p>
  <pre><code>Dash  example
  </code></pre>
  <p>I have seen the same thing happening with the french apostrophe.
  I also tried to change the collation already, but that did not help.
  Also tried it by using <code>nvarchar(max)</code> as column type.</p>
  <p>This is the insert code (including the sql):</p>
  <pre><code>  const result = await conn.request()
                        .input('key', mssql.VarChar, key)
                        .input('value', mssql.Text, value)
                        .input('ttl', mssql.BigInt, cacheEndTime)
                        .query`INSERT INTO cache (cacheKey, value, ttl) VALUES (@key, @value, @ttl)`;
  </code></pre>
  <p>Can you please help with a correct table structure or sql statement to make this work?</p>