views:

334

answers:

1

Recently I came across a situation where, while using a double-byte language, I had to enter the charset as a metatag.

Previously I had thought that the globalization tag in the web.config would handle the page charset, but this seems not to be the case.

Is there a way to set charset in the web.config or a way to set the charset of an entire web site without having to enter the metatag on every page?

+2  A: 

Doesn't setting the responseEncoding in the globalization element in the web.config like this, work?

<configuration>
  <system.web>
    <globalization
      fileEncoding="utf-8"
      requestEncoding="utf-8"
      responseEncoding=""
      culture="en-US"
      uiCulture="de-DE"
    />
  </system.web>
</configuration>

Otherwise, use a basepage and set the charset in there, but that's a lot of work.

pb
That is what I thought, but in this particular case the title tag didn't render in the correct encoding. Only by adding the meta tag did the title come out correctly.
metanaito