This method assumes that your browser recognizes
Content-Type: type; charset=name
HTTP header field as described in Internationalization of the Hypertext Markup Language (RFC 2070). Every browser which claims to implement Hypertext Transfer Protocol -- HTTP/1.1 (RFC 2616) should understand this directive, see corresponding quotes. Of course your browser needs to know about KOI8-R character set itself, too.
The server uses
HTTP header answer field
to inform your browser about document character set.
Default HTTP header for HTML files looks like this:
HTTP/1.1 200 OK Date: Thu, 27 Nov 1997 18:55:52 GMT Server: Apache/1.3b3 Connection: close Content-Type: text/htmlFor Russian KOI8-R character set HTML documents, it will take the form:
HTTP/1.1 200 OK Date: Thu, 27 Nov 1997 18:55:52 GMT Server: Apache/1.3b3 Connection: close Content-Type: text/html; charset=koi8-rinstead of default form.
When your browser encounters this HTTP header line, it displays the document using KOI8-R character set (or font).
The same words are true for text files too, in this case server must replace default text files header
... Content-Type: text/plainwith
... Content-Type: text/plain; charset=koi8-rfor text files in KOI8-R.
To check if your browser support this method well, set its default encoding to ISO8859-1 or Western and try to load this example, then you'll see a Russian text if this method is supported, or some cryptic text if not supported. This test also checks for the HTTP over META bug.