/* <=====  DC.TXT  =====> */

DC
Universal Russian codepage DeCoder v 0.54c
(c)Evgeny Kotsuba, 1997-1999

--------------------------------------------
Licence.

This software is shareware.
You can use it for free for education and evaluation purposes only.
For any use for commercial, corporative or government purposes you 
should register your copy of DC or delete it from your computer(s).

You cannot delete author information; you cannot change exe file, 
do reverse engineering, etc.


Operation systems:
* OS/2 ver 3,4,5; DOS+DOS4GW, FreeBSD, Win9x/NT 
* Supported russian codepages:
        Dos,Koi8-R,Win,Mac,Iso,Quoted,Translit,Volapyuk,HTML,Dos-Fido
* special decoding modes:
        "psevdographics -> DOS", "Win + Special characters -> Win"

* Supported text modes:  Dos, Unix
* Decode modes:
  - precise coding from one to another codepage.
  - Autodecoding with search for appropriate c decoding sequence.
  - Autodecoding "Last Chance" with codepage construction.
* Working mode: only from file to file, one file - one codepage.
* Memory requirement:
    no less than 128K + file size * 2

=============================================================================
Usage.

In short.

To decode file f.txt
   to CP866 (DOS & OS/2) :        dc.exe ?D f.txt fdos.txt
   from  CP866 to CP1251(Widows): dc.exe DW f.txt fwin.txt

------------------------------------------------------
In brief.

Usage.: dc.exe [-][mode] FileFrom [FileTo] [-debug]
mode: CodepageFrom+CodepageTo+[Unix text mode][-]

Codepage:  D(os)|K(oi8)|W(in)|M(ac)|I(so)|
           Q(uoted)|T(ranslit)|V(olapyuk)|H(TML)|F(ido)

CodepageFrom: Codepage|?|!
CodepageTo:   Codepage

Text mode: U(nix)|D(os) (default)
Reverse decoding is defined for unary U,D,Q,T,H,F (say, U-)

FileFrom - input file name
FileTo   - output file name, when omitted then FileTo = FileFrom

debug -  debug option for usage with auto decoding
----------------------
If mode is omitted,than default from DC.INI is used.

DC.INI define 7 codepages, you can change it or write your own

----------------------

Dos  -> Koi8-R:                  dc.exe DK  textDos.txt   TextKoi.txt
Dos  -> Koi8-R + Unix text mode: dc.exe DKU textDos.txt   TextKoi.txt
Koi8 -> Dos + Dos text mode:     dc.exe KD  textDos.txt   TextKoi.txt

Win -> Koi8 and Unix text mode: dc.exe WKU textWin.txt   TextKoi.txt
Unknown -> Dos:                 dc.exe ?D  text.txt      TextDos.txt
Test for coding:                dc.exe ?   text.txt
Unknown, "Last Chance" -> Dos:  dc.exe *D  text.txt      TextDos.txt

Default decoding:               dc.exe     text.txt      TextDef.txt
Default decoding    䠩: dc.exe     text.txt

To Unix text mode:              dc.exe U   text.txt
               or:              dc.exe D-  text.txt
To DOS  text mode:              dc.exe D   textUnix.txt  TextDos.txt
               or:              dc.exe U-  textUnix.txt  TextDos.txt

           Quoted-printable:
From Quoted:                    dc.exe Q   TextQuot.txt  text.txt
To   Quoted:                    dc.exe Q-  text.txt      TextQuot.txt

           Transliteration:
KOI8-R -> Translit:             dc.exe T   TextKoi.txt   textTrans.txt
Translit -> KOI8-R:             dc.exe T-  textTrans.txt TextKoi.txt

           Volapyuk:
KOI8-R -> Volapyuk:             dc.exe V   TextVolap.txt textKOI.txt
Volapyuk -> KOI8-R:             dc.exe V   TextVolap.txt textKOI.txt
DOS -> Volapyuk:                dc.exe DV  TextDos.txt   textVolap.txt
Volapyuk ->DOS :                dc.exe VD  textVolap.txt TextDos.txt

           Dos-Fido:
Fido -> Dos:                    dc.exe F   textFido.txt  TextDos.txt
Fido -> Dos:                    dc.exe FD  textFido.txt  TextDos.txt
Dos  -> Fido:                   dc.exe F-  TextDos.txt   textFido.txt

             HTML:
Normal  -> HTML:                dc.exe H   Text.txt      textHTML.txt
HTML    -> Normal:              dc.exe H-  textHTML.txt  Text.txt


Output to screan (console) (OS/2, Win9x/NT, FreeBSD): 
                                dc.exe ?D  text.txt     con

   Special coding modes (realise with DC.INI):
psevdographics CP866 to '+','|','-':    DC  AD  Text.txt 

Special characters of Windows (upper and lower commas, etc.)
to Dos characters(realise with DC.INI):

 DC SW text.txt
----------------------------------------------------------------
1.2 FreeBSD

In FreeBSD and Co there is some probem with using options with "?" , etc.
for DC and csh, sh , etc.
Use commas as:
DC "?K" intext outext

There is one more problem with application dc (digital calculator) 
use DC for DeCoder and dc for calculator.

1.3 Win9x/NT - for better perfomance use normal commanders as FC or Far.


=============================================================================

2. How much russian's codepage(s) is ?
--------------------------------------

D(os)    Usial Dos codepage (CP866), also sometimes called "Alternave"
F(ido)   is CP866 with change of russian characters 'H' and 'p' to 
         latin.
Alternave - original alternative coding (CP855),

K(oi8)   used on unix system and throwout the Net (CP-878) Was registered
         by A.Chernov as KOI8-R in (RFC 1489).

W(in)    Suxx codepage for Windows(CP1251), was invented by Microsoft/rus
         and joint venture "Paragraf" for Dos incompatibility.
         Humor is that in russian Windos CP1251 is used simultaneous with
         CP866.
M(ac)    Codepage for russian MAC (CP10007). Upper case is from CP866, 
         lower case - from CP1251.

I(so)    Iso 8859-5. Strange codepage from standart committee, also
         called as GOST. 

Q(uoted) quoted-printable. It is not codepage at all, but regullary climbs out
          various windows (=A0=A1=A2) It is  intrigues of imperializm and
          defined in RFC 1521.


7(bit)   Koi8 without bit 8. This is why KOI8 was invented - russian text
         can be readable only on 7bit systems.

T(ranslit)  right transliteration can use 2-3 english characters for one
         russian. Is almost the same as  Volapyuk but it has no way to 
         code change russian/english

V(olapyuk) it is transliteration with coding of russain/english changes
         via using  <r> and <l> .


H(TML) - coding for russain characters from english HTML editors.
        (&Agrave;&Aacute;&#128;). 

deBill  codepage is codepage for abuse to Billy's mother. It is construsted
        only from question marks for upper 128 characters.
        ( ?????? ???? Windows.)

There was also "old gost"/"Osnovna'a", "bolgarian", "BESM-6", "DVK/PDP"
coding...
-----------------------------------------------------------------------------
The simplest way to install russian codepage in pure DOS or fullscrean
Dos session in OS/2 or MS Windows is to use KEYRUS by great russian
programmer Dm.Gurtiak, you can find it at http://www.softpanorama.org
=============================================================================
Some important info:
use DC.INI as binary file, 
you can change it only with pure text ASCII editors.  
=============================================================================

OS/2 users and developers can use DCPACK
http://g23.relcom.ru/g23/9749/dc/dcpack.zip 
 
 DCPACK

 o Universal Russian codepage DeCoder v0.54 
 o Clipboard Coder v0.06  (old name -  Pmclico)
 o Clipboard Coder for lazy v0.01 
 o REXX extention library rxDCplus v0.01 
 o Developer Kit DCdll v0.54 
 o Developer Kit DCplus v0.01 
----------------------------------------------
==============================================
DC homepage   http://g23.relcom.ru/g23/9749/DC
Author E-mail: laser.nictl@g23.relcom.ru


Evgeny Kotsuba,
S&R Laser Center,  Shatura, Russia
http://g23.relcom.ru/g23/9749

