home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
p
/
pktxl31.zip
/
PKTXL.INF
< prev
next >
Wrap
Text File
|
1992-05-22
|
8KB
|
202 lines
PKTXL - Packet Translater.
==========================
(c) 1990, 1991, 1992 Nils Hammar.
This program is free to use by anyone in a non-commercial manner.
For commercial use, contact me before implementation.
This program is used to change the character set in
type 2 and type 2 compatible PKT-files.
The program recognizes FSC-0050, FSC-0051 and FSC-0054 level 1 and 2.
***************************************************************************
* If you find use for this program, please *
* send a funny postcard to the address below. *
***************************************************************************
General.
--------
The intention of this program is to limit the problems with several different
character sets floating around. All those character sets floating around is
due to the wish to use national characters together with the "[]{}\|"
characters. Several countries have their own 7-bit character sets, but those
are conflicting with the mentioned special characters that often is used
in program listings.
Character sets.
---------------
Current character sets are the following:
-1 Translation to the so called umlaut format, usually used in Germany.
0 Swedish 7-bit.
1 IBM PC 8-bit. (CodePage 437).
2 ISO 8859-1.
3 Mac 8-bit.
4 French 7-bit.
5 German 7-bit.
6 Brittish 7-bit (UK).
7 Danish 7-bit.
8 Italian 7-bit.
9 Spanish 7-bit.
10 Japanese 7-bit.
All translations are not complete, but the 3 first Will not give you any
problems, since they are tested. The remaining tables are not guaranteed to
work, but should work.
The japanese character set is really only the Yen sign instead of a backslash.
It isn't possible to supply this program with an user-defined character set,
but if you send me information about what your characters are defined as, I
will try to implement it.
History.
--------
From version 2.0 it is possible to convert from any of the known formats given
by positive numbers to the german "umlaut" format, which converts a
country-specific character to two international characters.
Also conversion FROM FSC-0051.001 to any other character set is possible.
Conversion to FSC-0051.001 i NOT supplied, and will not be unless FSC-0051
is specified in a FTS-document.
Version 2.0 and earlier had a funny bug, which would convert soft CR into
another character when converting from PC-8 to other 8-bit sets.
Version 2.1 did corrupt the subject line when translating to the german
"umlaut" format. Now is the subject line not translated when translation
is to or from a multi-byte standard.
Version 2.2 now recognizes the CHARSET kludges and makes translations
according to them. The CHARSET kludge is then removed because it is no longer
correct for the translated text. The program accepts multiple charset kludges
for each text. If you select a from character set that is less than 0,
the charset kludges are not recognized and removed.
A new CHARSET kludge is added first in the text that describes which character
set the text is using. The charset kludge is only added if the environment
variable PKTXL is set with the option -KLUDGE.
E.g. : "SET PKTXL=-KLUDGE"
Also implemented in version 2.0 is the posibility to kill quotes in text.
This will reduce the size of the texts in the message database with about 20%.
Version 3.0 is a bug-fixed and upgraded version that now can handle
FSC-0050, FSC-0051 and FSC-0054 level 1 & 2.
The program is currently adding either a FSC-0050 or FSC-0054 kludge,
depending on if the character set was defined in FSC-0054 or not.
It's some kind of fall-back function.
The quote erasing function was removed, and options allowing the user
to remove Soft CR:s and LF:s from the messages was added.
The environment variable PKTXL can now contain two more options.
"-NOLF" and "-NOSOFT". All options can be combined like the following:
SET PKTXL=-KLUDGE-NOLF-NOSOFT
This will tell the program to add a new character set kludge and to
remove all LF:s and Soft CR:s.
Version 3.1 is another leap forward that allows the user to set the
various options on the command line instead of with the environment
variable. However, the environment variable may still be used.
The command line will also allow short forms of the options:
-K Add CHRS or CHARSET kludges to the processed messages.
-L Remove the line feed character from all processed messages.
-S Remove all Soft CR:s from all processed messages.
This version is also possible to execute under OS/2.
The screen output has been cleaned up a little to save the user from
unnecessary information.
Observe that even if you are running the program with the adding of
kludges as well as removing of both Soft CR:s and LF:s, the total size
wouldn't increase much. I have noted an increase in message size of
0.7 percent when converting around 1MB PKT-files.
Kludge parameters.
------------------
The first alternative in the left column of the following table is used
when adding a kludge for the destination character set. The other
alternatives are the various definitions that are recognized on an incoming
message.
Kludge data that is accepted:
No. Id.
--------------------
0 SWEDISH, ISO-11, FINNISH
1 IBMPC, CP437, IBM, PC-8
2 Latin-1, ISO 8859-1, ISO8859-1, ISO Latin-1, ISO-6, AMIGA
3 MAC
4 FRENCH, ISO-69
5 GERMAN, ISO-21
6 UK, BRITISH
7 NORWEG, DANISH
8 ITALIAN
9 SPANISH
10 JAPANESE
Specifying -1 as output character set selects the german
"umlaut" format as output. The umlaut format has it's own charset identifier
"UMLAUT", which is inserted in FSC-0050 format.
Operation.
----------
This program does not modify the original files! New files are created.
Observe that input and output file must not be in the same directory.
Syntax: PKTXL [<flags>] <origfiles> <newdir> <fromcharset> <tocharset>
E.g.: PKTXL C:\OUTPACKS\*.OUT D:\TMP 1 2
This example translates *.OUT-files (which has the same format as PKT-files)
from IBM PC-8 (codepage 437) to ISO 8859-1. The result is stored in the
directory D:\TMP. Any message containing a kludge indicating a character
set different from PC-8 will be translated from that format instead.
The operation of the program is controlled partly via the environment
variable "PKTXL". This variable can be set to the following values
in any combination.
Value Explanation
--------------------------------------
-KLUDGE Add CHRS or CHARSET kludges to the processed messages.
-NOLF Remove the line feed character from all processed messages.
-NOSOFT Remove all Soft CR:s from all processed messages.
E.g: SET PKTXL=-NOSOFT -NOLF
This line will tell PKTXL to remove all Soft CR:s and Linefeed characters
when processing the messages. This will reduce the size of the messages
Misc.
-----
This program is simple and efficient to implement, and fits all systems
that has possibility to toss, scan, pack and unpack separately.
This program can not handle packed files, they have to be unpacked first.
Packing and unpacking may be performed by the program PKTSecure.
If you recompile the program, please use memory model LARGE, otherwise
you might get unpredictable effects. The stack will probably also need to
be adjusted to avoid suspicious effects. I am using a stack of 0x3000,
but this is probably overkill.
You will use this program on your own risk, I am not responsible for any
trouble that the use of this program causes.
Any ideas regarding this program may be sent to:
Nils Hammar 2:204/90@fidonet
or internet address: 4341@msg.abc.se
or Snail Mail:
Nils Hammar
Storstigen 35B
S-951 39 LULEÅ
SWEDEN