Non-HTTP or external KOI8-R resources handling

According to "HTML 4.01 The A element" you can supply any of your anchors with a CHARSET and HREFLANG attributes. For example, if you know for sure that some FTP file is Russian language KOI8-R-encoded, you can refer to it in the following form:

<A TYPE="text/plain" CHARSET="KOI8-R" HREFLANG="ru"
HREF="ftp://host/path/file.txt">
file.txt</A>

and a conformant browser will use the attribute-specified character set for that document.

Note: CHARSET attribute is obsoleted in "HTML5 The a element", use extended TYPE attribute instead:

<A TYPE="text/plain; charset=KOI8-R" HREFLANG="ru"
HREF="ftp://host/path/file.txt">
file.txt</A>

The same is true for the LINK tag too. For "HTML5 The link element":

<LINK REL="alternate" TYPE="text/html; charset=KOI8-R" HREFLANG="ru"
HREF="ftp://host/path/file.html">

For "HTML 4.01 The LINK element" use old notation with CHARSET attribute:

<LINK REL="alternate" TYPE="text/html" CHARSET="KOI8-R" HREFLANG="ru"
HREF="ftp://host/path/file.html">

For JavaScript (*.js) scripts in "HTML 4.01 The SCRIPT element" and up to "HTML5 The script element" CHARSET attribute remains valid, so use:

<SCRIPT TYPE="text/javascript" CHARSET="KOI8-R"
src="/images/file.js"></SCRIPT>