code: private String unescapeQuotes(String literal) {
          String value = literal.substring(1, literal.length() - 1);
          if (value.length() == 0) {
              // empty string
              return value;
          }
          if (literal.charAt(0) == '"') {
              value = value.replaceAll("\"\"", "\"");
          } else {
              value = value.replaceAll("''", "'");
          }
          return value;
      }
docs: Unescapes single or double quotes depending on how <code>literal</code>
  is enclosed and strips enclosing quotes.
  
  </p>
  Examples:<br>
  <code>"foo""bar"</code> -&gt; <code>foo"bar</code><br>
  <code>'foo''bar'</code> -&gt; <code>foo'bar</code><br>
  but:<br>
  <code>'foo""bar'</code> -&gt; <code>foo""bar</code>
  
  @param literal the string literal to unescape
  @return the unescaped and stripped literal.