<p dir="auto">The server response doesn't set <code class="notranslate">charset</code> in <code class="notranslate">content-type</code> header. This might be a limitation that some website needs some some special encoding.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">By default <code class="notranslate">content-type</code> response header should be <code class="notranslate">text/html; charset=utf-8</code><br>
Also there should also be an option to override the default charset in <code class="notranslate">next.config.js</code></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// next.config.js
module.exports = {
  encoding: 'iso-8859-1'
}"><pre class="notranslate"><span class="pl-c">// next.config.js</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">encoding</span>: <span class="pl-s">'iso-8859-1'</span>
<span class="pl-kos">}</span></pre></div>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The <code class="notranslate">content-type</code> is hard-coded as <code class="notranslate">text/html</code></p>
<h1 dir="auto">Bug report</h1>
<p dir="auto">Note there are 4 similar issues but I think none of them is duplicate.</p>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I think it's not possible to create a Link for dynamic route with query params in a way which would work both server-side &amp; client-side.</p>
<h2 dir="auto">To Reproduce</h2>
<ul dir="auto">
<li>create <code class="notranslate">/pages/[id].js</code></li>
<li><code class="notranslate">const { query: { id, foo } } = useRouter()</code></li>
<li><code class="notranslate">console.log(id, foo)</code></li>
<li>create <code class="notranslate">/pages/index.js</code></li>
<li><code class="notranslate">&lt;Link href="/[id]" as={{ pathname: '/123', query: { foo: 'bar' } }}&gt;&lt;a&gt;...</code>
<ul dir="auto">
<li>this way, it doesn't propagate to client-side (only <code class="notranslate">id</code> is available, <code class="notranslate">foo</code> is <code class="notranslate">undefined</code>)</li>
</ul>
</li>
<li><code class="notranslate">&lt;Link href={{ pathname: '/123', query: { foo: 'bar' } }}&gt;...</code>
<ul dir="auto">
<li>this seems to work but it also does request to <code class="notranslate">/pages/123.js</code> and that throws <code class="notranslate">404</code> which in turn does full-page reload which actually shows what's expected (but it's super-ugly and much slower as it's just SSR result and not regular client-side route transition)</li>
</ul>
</li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I'd expect <code class="notranslate">href="/[id]" as={{ pathname: '/123', query: { foo: 'bar' } }}</code> to work with both client-side routing and prefetching (if I understand correctly what that <code class="notranslate">123.js</code> request is)</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Browser: latest Chrome</li>
<li>Next.js: 9.2.2-canary.15</li>
</ul>