How to setup Win95 for KOI8-R properly

It is nice if some program support KOI8-R<->CP1251 translation automatically, but:

  1. Such programs are very rare and many interesting Internet software knows nothing about decoding needed.
  2. Emulating KOI8-R via CP1251 is incomplete because charsets are different.
In this situation it will be nice to have KOI8-R as separate Code Page 878 for Windows 95 until some critical mass of decoding programs will be reached.

See also Notes about Cp_20866.nls resource (for programmers).

Really we don't need fonts conforming to KOI8-R charset at all, .TTF from Microsoft is always in UNICODE and proper way is using them. The only thing that you must do is to add KOI8-R -> UNICODE translation table using \Windows\System\gdi.exe resourse. This resource is simply array with 256 entries of word size: index is ANSI code of character, value is Unicode code. It is RC_DATA with ID=100..200, its name stored into corresponding string resource 1000+ID.

Step-by-step instructions of KOI8-R translation resource creation

  1. Choose one of already patched which match your system gdi.exe, download, unzip it into temporary directory and jump to step 3.
  2. If your system gdi.exe size or type not match any of listed above, you need to patch your gdi.exe by yourself using instructions started from step 5. If you got successfull result, please send me your patched gdi.exe zipped copy and I add it to two listed above.
  3. Exit from Win95 to plain MS-DOS, backup your old \Windows\System\gdi.exe and move unpacked gdi.exe from temporary directory to \Windows\System\ (you can't just overwrite gdi.exe beeing inside Win95 because the file in use).
  4. Reboot your PC now back to Win95 and jump to step 10.
  5. Make a copy of your \Windows\System\gdi.exe and open this copy in Visual C++ 4.0 or Borland Resource Workshop 4.5
  6. Choose the ID value 238 (Central European). Using this particular ID allows KOI8-R fonts appearse as Central European fonts (font name with CE suffix will changed later to Font Name KOI8-R) for old-style programs such as Character Map or Microsoft Word.
  7. Overwrite this resource with the resource data below: (it conforms to Unicode translation table from Registration of a Cyrillic Character Set (RFC 1489))
  8. Each Data ID has a corresponding string in the string table with ID + 1000 (for Central European it's 1238). That's what is shown in programs font chooser boxes usually titled as Script for Win95 Standard Edition or Набор символова for Win95 Russian Edition. Change the string to Russian (KOI8-R) for Win95 Standard Edition or to Русский (KOI8-R) for Win95 Russian Edition. You can download Borland Rsource Workshop data (Script name) for Win95 Standard Edition or Borland Rsource Workshop data (Набор символов name) for Win95 Russian Edition and paste it into 1238 resource.
  9. Save, backup your \Windows\System\gdi.exe, exit from Win95 to DOS (this step is important), rename just saved copy to \Windows\System\gdi.exe and reboot your PC back to Win95.
  10. Open \Windows\win.ini, find
    [FontSubstitutes]
    
    section (or add it, if not present). Change all CE suffixes to KOI8-R suffixes. Typicall old entries should look like:
    Arial CE,238=Arial,238
    Courier New CE,238=Courier New,238
    Times New Roman CE,238=Times New Roman,238
    
    and new ones:
    Arial KOI8-R,0=Arial,238
    Courier New KOI8-R,0=Courier New,238
    Times New Roman KOI8-R,0=Times New Roman,238
    Arial Black KOI8-R,0=Arial Black,238
    Impact KOI8-R,0=Impact,238
    Verdana KOI8-R,0=Verdana,238
    
    (add them, if they not present and don't forget to put longer descriptions before shorter ones). It allows access to KOI8-R fonts for old-style programs which knows nothing about font Scripts.
  11. Save the file, reboot.
  12. Now execute any program with font chooser box (Netscape 2.0 f.e.), you'll find Russian (KOI8-R) there, choose it, enjoy.
  13. Now its time to setup native Win95 keyboard driver for KOI8-R.

Big help in this area comes from Walter Kondrashov <Walt@gecko.crec.mipt.ru>, Alexander Smundak <sasha@whitelight.com> and Vadim Burtyansky <burtyan@luckynet.co.il>, thanks.

See also the same issue for Win3.11, Notes about Cp_20866.nls resource (for programmers) and How to setup native Win95 keyboard driver for KOI8-R.

Return to Main Page