Ŀ
                                                                       
                         
                                            
                                        
                   Version 2.6   
                                                                       


   (C) October 1994, Konstantin Gredeskoul, version 2.5
   (C) April 1995, Konstantin Gredeskoul, version 2.6
   All rights reserved.



Contents:
---------

1.  What is it?
2.  How to use it?
3.  What files are already supplied?
4.  Disclaimer.
5.  Contact address and FTP locations.      
6.  Changes and updates.



1. What is it?
--------------

     CONVERT is the utility for multiple  replace  in  texts  and  for
transforming texts from one encoding system to another. The program is
free, use it at your own risk.

     CONVERT has two modes of working (see also "How to use?").
        
     Mode 1: -- one-to-one conversions (main mode).

     The simplest example of such a conversion is  this:  suppose  you
want to change all "w"-letters in your text file TEXT.TXT to "v". With
CONVERT - no problem! You can create the file,  say,  MYCODE.COD  with
the following lines in it:

/BEGIN
/CHARS
w=v
/ENDOF

     Running the program like "CONVERT TO MYCODE TEXT.TXT" you'll  get
the new file called TEMPFILE.TXT which will be exactly as TEXT.TXT but
with all w's changed to v's. And of course, running CONVERT with  FROM
argument instead of TO will change all v's to w's.

     With one letter it is simple enough to do in any editor that  can
do SEARCH and REPLACE. However, if you want to  change  5  or  10  or,
even, 30 characters in your text to something else,  then  CONVERT  is
what you have been waiting for!

     For English-only speaking users, the only interesting code  files
in the pack are SAMPLE.COD, ENCRYPT.COD and  LOWER.COD,  functionality
of which is discussed below.

     For people who deal  with  Cyrillic  on  PC's,  this  program  is
invaluable, as it can do a transformation both FROM and  TO  virtually
any presently used Cyrillic  encoding  system.  Supplied  code  tables
enable you to port  texts  between  several  major  Cyrillic  encoding
systems, such as Alternative for MS-DOS, KOI-8,  KOI-7,  Windows  font
standard encoding CP1251, non-standard font encoding schemes  Cyrillic
and  Trans-Cyrillic.  The  basis  for  all  supplied  code  files   is
Alternative encoding for MS-DOS, so to convert from  KOI-8  to  CP1251
you first convert KOI-8 --> Alt, and then Alt --> CP1251. This can  be
done with running CONVERT two times, as below:

CONVERT FROM KOI8 file1 file2
CONVERT TO CP1251 file2 file3

     This process can be optimized in two different ways: (1) you  can
write another code file with conversion table  that  maps  KOI-8  <-->
CP1251; (2) by using  batch  files  which  do  a  two-step  conversion
automatically. Second method is less time and diskspace consuming,  so
two such batch files are supplied -  TC2WIN.BAT  and  C2WIN.BAT  which
convert Trans-Cyrillic to CP1251 and Cyrillic to CP1251  respectively.
If you need to do  a  two-step  conversion  (like  the  one  described
above), you can copy either of them  to,  say,  MINE.BAT  and  replace
obvious lines in arguments to CONVERT by the code files you need.

     You are welcome to create and distribute new code or batch files.
Refer to instructions in the SAMPLE.COD file on creating your own code
file.

     Mode 2: -- Cyrillic transliteration.

     This mode is useful only for people that use Cyrillic on PC's. In
this mode,  CONVERT  will  convert  any  file  like  that  "po  russki
angliyskimi  bukvami"  to  a  text  file  of  real  Russian  text   in
Alternative encoding.  There  will  be  some  mistakes,  but  this  is
unavoidable. The rules of conversion are pretty  complicated.  CONVERT
will try to do the best and it will do a reasonably good job for  you.
For example, in Russian word "eto", first letter will be  changed  not
to "e" but to what's supposed to be there. Same for "poetomu", "etot",
etc. It won't work for "estoniya", thought, so you'll need to edit the
file later on.



2. How to use?
--------------

USAGE (1): convert <from|to> <code file> <source file> [destination file]
EXAMPLES : convert from koi8 sometext.koi sometext.txt
           convert to encrypt.cod mytext.txt mytext.enc

USAGE (2): convert <source file> [destination file]
EXAMPLES : convert myfile.txt myfile1.txt
           convert myfile.doc

NOTES:

    * Two  usages  correspond  to  the  two  different  transformation
programs called. Mode (1) (with more than 2 parameters) tells  CONVERT
to use external files where the codes are stored. Mode (2)  (with  one
or two parameters) activates the transliteration program (see "What is
it?" for more info).

    * If a name of destination file is not mentioned, CONVERT will use
TEMPFILE.TXT in the active directory as a destination.

    * If some part of a source file is  to  be  left  as  it  is  (not
converted) it should be surrounded by "~" symbols. Eg, if this is  the
source file, then this is to be converted, and ~this is  not~.  The  ~
character is a command and it will not appear in the destination file.

    * In mode (1), the extension of code files is assumed to be ".COD"
unless otherwise specified in the full name of code file.



3. What files are already supplied?
-----------------------------------

     CONVERT is written in Borland Turbo Pascal 6.0. The  source  code
is included in the pack, and available upon request from the author.

     The pack should include the following files:

General files:
~~~~~~~~~~~~~
CONVERT  EXE    The program itself

CONVERT  TXT    This file

SOURCE   ZIP    Source code in Pascal

Code files:
~~~~~~~~~~~
SAMPLE   COD    Sample conversion file, that explains how to write
                your own code (conversion) files. Read it if you want
                to create your own code file.

CP1251   COD    Code file for porting Cyrillic texts between Alternative
                code and codes of CP1251 TT family of Fonts for MS-Windows 
                such as Baltica, Adver-Gothic, Kudriashov, Jikharev, 
                Futurist, etc. 

CYRTTF   COD    Code file for porting Cyrillic texts between Alternative
                code and codes of TT Font for MS-Windows "Cyrillic".
                This font is distributed as a freeware (?) and may be 
                downloaded from ftp.cica.indiana.edu, directory
                /pub/pc/win3/fonts... find it there.

TRANSCYR COD    File for converting between Alternative encoding for 
                MS-DOS and codes of TT Font for Windows called 
                Trans-Cyrillic.

KOI7     COD    Code file for transforming Alternative Cyrillic <-->
                KOI-7 codes. Written in /CHARS format.

KOI8     COD    Code file for transforming Alternative Cyrillic <-->
                KOI-8 codes. Written in /CHARS format.

KOI8ASC  COD    Code file for transforming Alternative Cyrillic <-->
                KOI-8 codes. Written in ASCII codes format. 
                Functionally, not different from the above, just something
                to show how /ASCII mode works. 

ENCRYPT  COD    Code file for encrypting texts written in English
                or in Russian. Encryption is of course very easy to
                decrypt. 
                (eg. to encrypt: CONVERT TO ENCRYPT FILE.TXT FILE.ENC)

LOWER    COD    Code table for converting English texts.
                Replaces all lower/upper case letters with upper/lower 
                case letters. Sometimes useful. I used it once.

MYCODE   COD    File referred to above, in section 1.

Batch files:
~~~~~~~~~~~~
TC2WIN   BAT    Batch for converting FROM Trans-Cyrillic font codes TO
                Windows CP1251 Font codes. 

C2WIN    BAT    Batch for converting FROM Cyrillic (CYRTTF) font codes TO
                Windows CP1251 Font codes. 


4. Disclaimer
-------------

     The author hereby  disclaims  all  warranties  relating  to  this
software, whether expressed or implied, including  without  limitation
any implied warranties of merchantability or fitness for a  particular
purpose. The author will not be liable for  any  special,  incidental,
consequential, indirect or similar damages due to loss of data or  any
other reason, even if advised of the possibility of such  damages.  In
no event shall the author's liability for any damages ever exceed  the
price paid for the license to use the software, regardless of the form
of the claim. The person using the software bears all risk as  to  the
quality  and  performance  of  the  software.  Use  of  this   package
constitutes agreement on the part of the user to this disclaimer.



5. Contact address and FTP locations.
-------------------------------------

     Any comments, questions or encouragement are welcome!  Send  them
via e-mail to

     <kig@fermat.maths.monash.edu.au> or to
     <kig@brain.physics.swin.oz.au>. 

     You are most likely to catch me logged into the first address.

     If you would like to know more about the author, you are  welcome
to visit my WWW home page. It's URL is:

     http://www.maths.monash.edu.au/~kig

     The letter with $10 encouragement fee will be highly  appreciated
but is not compulsory. I will just be very glad. Thank you in  advance
for considering this possibility. Payments are accepted as a  personal
cheques or bank draft/cheque; Australian dollars  are  preferred,  but
American dollars may be used as well. My post address is:

     Konstantin Gredeskoul
     CONVERT Producer
     4/7 Exhibition Street, 
     Bentleigh, Victoria 3204, 
     Australia.

     The latest version of the program (with source code) will  always
be available via anonymous ftp login at

     Site -------> brain.physics.swin.oz.au [136.186.27.10]
     Directory --> /pub/kig/msdos
     File -------> convert.zip
     Size -------> about 40K

There is also a copy at

     Site -------> infomeister.osc.edu
     Directory --> /pub/central_eastern_europe/russian/msdos/russ-converters
     File -------> convert.zip

But this might be an old version. I will try to keep it up-to-date  of
course, but replacement of the program at infomesiter  depends  solely
on the moderator of this archive.



6. Changes and Updates.
-----------------------

     This part describes what has changed in this version 2.6 compared
to the previous version 2.5

     Main module  CONVERT.EXE  has  not  been  changed  significantly,
although, some minor bugs were fixed. A code  file  have  been  added:
TRANSCYR.COD (see below). BALTICA.COD has been renamed  to  CP1251  to
reflect the true name of the encoding. ENCRYPT.COD has  been  extended
to cover Cyrillic as well. This documentation file  has  been  updated
and corrected. Batch files C2WIN.BAT and TC2WIN.BAT have  been  added.
They allow two-step conversions of texts (see above).

     If you have any questions or problems, please do not hesitate  to
write to me! Thanks for reading through this! Have fun!

Konstantin Gredeskoul 
April 1, 1995
