title: JDBC: Issue with rendering Danish specific characters: Ø,Å,Æ
body: <p>Problem:
  Danish specific characters are displayed improperly(as non readable chars)</p>
  <p>Given:
  Database is <code>Microsoft SQL server 2019</code>, database collation is: <code>Danish_Greenlandic_100_CS_AS</code>. Data has been stored in Varchar column types, data has been already there; change collation or any data modification is not appropriate. I am not inserting data, only reading them(kind of report functionality).
  Everything is working fine on my local machine, however on staging environment Danish characters are encoded improperly.</p>
  <p>Connection initialization snippet</p>
  <pre><code>Properties props = new Properties();
  props.put (&quot;charSet&quot;, &quot;UTF-8&quot;);
  props.put(&quot;username&quot;, &quot;dbusername&quot;);
  props.put(&quot;password&quot;, &quot;secret&quot;);
  try (Connection con = getConnection(repositoryUrl, props);
     PreparedStatement preparedStatement = con.prepareStatement(sqlQuery)
  ) {
  
  </code></pre>
  <p>Reading data snippet:</p>
  <pre><code>ResultSet rs = //getResultSet
  while (rs.next()) {
              Map&lt;String, String&gt; rowEntry = new LinkedHashMap&lt;&gt;();
              for (int i =0; i &lt; columnCount; i++ ) {
                  int columnIndex = i+1;
                  String value = rs.getString(columnIndex);
                  rowEntry.put(columnName, value);
              }
              result.add(rowEntry);
          }
  </code></pre>