
*****************************************
*					*
*	Hi System Software, 1997	*
*	   Xlseq, Version 1.0		*
*					*
*****************************************

To view this file under Windows, maximize
the window for convenience.

General description
-------------------

This is an extended translation program replacing any byte sequences
in the source file with some other byte sequences, as specified in
an external translation table.  Working under MS DOS 3.x and higher.
Can be run under Windows and Windows'95 as an MS DOS application.

Usage:

	XLSEQ codetable_file source_file destination_file

Here, codetable_file, source_file and destination_file are any valid
MS DOS file names (long names are not supported).  If the destination
file already exists, it will be replaced by the result of translation.

The following files are included in the distribution package:

	XLSEQ.EXE	the executable file
	README.TXT	this document
	ALT2WIN.HXT	sample translation table:
			Cyrillic codepage 866 --> Windows codepage 1251
	WIN2ALT.HXT	sample translation table:
			Windows codepage 1251 --> Cyrillic codepage 866
	KOI2WIN.HXT	sample translation table:
			KOI-8 Cyrillic code --> Windows codepage 1251
	WIN2KOI.HXT	sample translation table:
			Windows codepage 1251 --> KOI-8
	RUS2EN.HXT	sample translation table:
			English transliteration of Russian words (codepage 1251)
	KAR2TUR.HXT	sample translation table:
			Cyrillic Karachay writing --> Turkish alphabet
	UNSPACE.HXT	sample translation table:
			from 1 to 30 spaces --> 1 tab character


Codetable format
----------------

A text file parsed line by line.  Characters with the ASCII codes less
than or equal to 32 (space) are treated as value separators.

A line specifying a single translation table entry must contain
at least two sequences of non-separator characters, the first of
them specifying the source sequence to be replaced by the second
sequence;  any more characters after the second sequence are treated
as comments.  Also, the lines that cannot be parsed as translation
table entries are treated as comments.

Source/destination character sequence may contain the following control
sequences:

	@H or @HH		hexadecimal byte value
	#D or #DD or #DDD	decimal byte value
	#-			no output

For example, character sequence A@4X@15C#12B#128 specifies the following
byte sequence (hexadecimal):
	41 04 58 15 43 0C 42 80

Note, that A@4B would produce the byte sequence 41 4B, while A@04B would
result in 41 04 42.  Since byte value cannot be greater than 255,
the character sequence #256 corresponds to the byte sequence 19 36.

The no-output sequence is useful when a sequence of source bytes is to
be replaced by the empty sequence.  Otherwise, it causes no effect.
Thus, a#-0 and a0 specify the same byte sequence.  One could use the #-
sequence to separate a special sequence from the rest of the text:
#4#-B will be treated as 04 42, unlike #4B representing just one byte 4B.

The backslash character is used to indicate that the following character
is to be interpreted as it is.  For example, \c is the same as c,
and \#4 is interpreted as two bytes: 23 34

Other tips
----------

1. At any moment, XLSEQ tries to find the longest match possible.
Thus, if the translation table contains the lines

cat	dog
cats	mice
like	don't@20like
mice	cat

the text

	All the cats like mice.

will be converted to

	All the mice don't like cats.

2. XLSEQ is not recursive:  it does not scan the byte sequences written
to the output file.

Support
-------

XLSEQ is FREEWARE.  You may distribute is as you like, but
you may not solve it or prevent others from using it.

Any comments and questions direct to Paul Jones:

pjones@fly.triniti.troitsk.ru

The new versions to appear are to be distributed through
HiLight:

http://www.geocities.com/CapeCanaveral/9321/hilight.htm

Thank you for using XLSEQ.
