How to setup X Window Netscape for KOI8-R

Netscape client must put acceptable charset (KOI8-R assumed) via Accept-Charset header field when interact with HTTPD, but not do it currently.

Frank Tang from the Netscape Team tell me about their plans of implementing Accept-Charset field into after-3.0 releases, but if you ask them too, it can be faster.


Tuning description

There is obvious way to substitute koi8-r fonts on iso8859-1 fonts place, but I don't recommend it because it breaks displaying of iso-8859-1 HTML documents and all programs which uses iso8859-1 fonts correctly.

For all Netscape versions:


  1. Install Cronyx KOI8-R fonts set v2.0 (see upper level section for details).

  2. Install X11R5 NLS workaround (see upper level section for details), without this step cyrillic characters not treated as legal characters in all places and can be replaced with blanks.

  3. Install KOI8-R keyboard to enter Mail/News messages.

  4. Copy Netscape.ad to /usr/{X11R6,X386,...}/lib/X11/app-defaults/Netscape (don't forget to drop the .ad at the end of the file name). If you can't modify system directories, make any directory, place Netscape configuration file there, then set XAPPLRESDIR environment variable to this directory (f.e. in Netscape startup shell script);


Per-version instructions:


For Netscape v4.0b2

This instructions moved to separate page.

For Netscape v3.0-3.01


Netscape v3.0-3.01 have KOI8-R support but with few serious bugs. To correct some of them (like wrong font in Mail/News subject lists and wrong MIME character set):

  1. Download v3.0 patch or v3.01 patch and apply it to newly copied /usr/{X11R6,X386,...}/lib/X11/app-defaults/Netscape using Larry Wall's patch utility. If you don't have Netscape.ad or /usr/{X11R6,X386,...}/lib/X11/app-defaults/Netscape files, here is already patched Netscape v3.0 defaults file (gzip) or Netscape v3.01 defaults file (gzip) copy it to /usr/{X11R6,X386,...}/lib/X11/app-defaults/Netscape. If you can't write to this directory, you can copy defaults file into $HOME/Netscape.

  2. Choose Cyrillic (koi8-r) in Options|General Preferences|Fonts|For the Encoding. Chose Times (Cronyx) into Use the Proportional Font. Choose Courier (Cronyx) into Use the Fixed Font.

  3. Don't forget to Options|Save Options.

Do not set Cyrillic (KOI8-R) encoding in Options|Document Encoding as permanent default encoding scheme (don't press Set Default). It violates HTML and HTTP standards which says that default document encoding (without any special instructions) must be ISO 8859-1. Temporary setting of another encoding is possible as workaround for broken Russian WWW pages.


Bug List:


  • Most unpleasant bug is that it is impossible to enter Russian (KOI8-R) characters in all places using correct Cyrillic_* keysyms, not hacked ISO 8859-1 keysyms. Now X11R6 XKB keyboard description defines Russian (KOI8-R) keyboard using right keysyms and old hacks not work anymore. Correct (minimally localized) application must call XtSetLanguageProc (NULLNULLNULL); to work with any charset not equal to ISO 8859-1, this call must be added to Netscape.

  • According to Internationalization of the Hypertext Markup Language (RFC 2070) charset= from HTTP header must overwrite charset= from <META ...> tag. Netscape does just opposite thing, i.e. <META ...> overwrites HTTP header charset. It cause serious bugs for automatic character sets decoding proxies. Load this test page with different HTTP header and META charsets to see this bug in action (check View|Document Info for Charset value, there must be KOI8-R, not windows-1251).

  • <FRAME> body & charset= strange bug hits only on fast Ethernet connection or with your local machine HTTPD and only if you don't have the document previously cached. Here is the link to test it, but you probably don't see it due to network delays with this site. I provide all needed HTMLs as Gzipped Tar archive, dounload/unpack it under your local running HTTPD and test it there instead. Don't forget to clear your cache before the test. You can press Shift+Reload several times, if you didn't notice anything strange at the first time. Symptoms are various from some screen distortions to Segmentation violation, Bus Error and memory eating hangs. It looks like threading/reloading/cache bottle neck for me.

    The bug trigger is simple: charset= specification inside <FRAME> body given in any form, i.e. it happens with both <META HTTP-EQUIV...> specification and HTTPD header. Charset can be any too: KOI8-R or even ISO-8859-1 crashes Netscape.

  • When Cyrillic(KOI8-R) is set as Document Encoding (or it is default encoding by Set Default), most of text-oriented Java applets works incorrectly, i.e. it looks like <PARAM> tags not passed to applet at all. NullPointerException becomes most frequent error. It heals by setting Document Encoding to Western(Latin1), but it is only workaround of real bug. BTW, MS Internet Explorer works right in this case.

  • Even if you specify Cyrillic (KOI8-R) as default document encoding, Netscape still uses
    FONT_SPEC: ....-fixed-iso-8859-1
    FONT_SPEC: ....-prop-iso-8859-1
    

    font from ~/.netscape/preferences instead of

    FONT_SPEC: ....-fixed-koi8-r FONT_SPEC: ....-prop-koi8-r

    fonts in following places:

    • You can't enter new Russian (KOI8-R) News/Mail messages with this release, wrong ISO8859-1 font used instead of KOI8-R font.
    • It shows <FORM> button names in wrong (ISO8859-1) encoding instead of KOI8-R encoding.
    • It uses wrong ISO8859-1 font for <FORM> input instead of KOI8-R font.
    Look at <FORM> input test to see <FORM> bugs in action.

  • This release can't Cut&Paste Russian (in fact, any 8bit) characters with its own Clipboard even when X Clipboard is able to do it.

  • Netscape use wrong encoding (ISO8859-1) for special HTML characters such as &copy;, &reg;, etc. and not follow RFC 1489 here.

Enter your name, E-mail address and send the bug report above to Netscape team, the more bug reports they receive - the higher chances there are that they fix it.

Your Full Name:
E-mail Address:

You can additionly edit this text if you want:

Subject:

Bug report:

You can use original Netscape bug report page instead, just Copy this bug report and Paste it there.


For Netscape v2.02:


  1. Download v2.02 patch and apply it to newly copied /usr/{X11R6,X386,...}/lib/X11/app-defaults/Netscape using Larry Wall's patch utility. If you don't have Netscape.ad or /usr/{X11R6,X386,...}/lib/X11/app-defaults/Netscape files, here is already patched Netscape v2.02 defaults file (gzip) copy it to /usr/{X11R6,X386,...}/lib/X11/app-defaults/Netscape. If you can't write to this directory, you can copy defaults file into $HOME/Netscape.

  2. Choose Russian encoding and Cronyx fonts from Options|General|Fonts menu.

WARNING: news articles and mail messages with Russian letters will have wrong MIME charset (iso-8859-1 instead of koi8-r). It can cause incorrect decoding of such messages in certain mail/news agents.

For Netscape v1.*:


  1. Find all occurances of iso8859-* and change them to koi8-r;

  2. Find these lines in the file:
     *documentFonts.latin1*registry:        iso8859
     *documentFonts.latin1*encoding:        1
    
    and change them to:
     *documentFonts.latin1*registry:        koi8
     *documentFonts.latin1*encoding:        r
    

Some help in this area comes from Eugene Byrganov <E.B.Byrganov@inp.nsk.su>, thanks.

See also Win3.* Netscape tuning, Win95 Netscape tuning.

Additional links: Netscape Internationalization Secrets.

Return to Main Page