Method which requires HTTP daemon actions

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 Content-Type 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/html 
For 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-r 
instead 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/plain 
with
 ... Content-Type: text/plain; charset=koi8-r 
for text files in KOI8-R.

If you use Apache HTTPD, you can easily tune it to support this specification.