======================= iso2pc - pc2iso ======================= This package is available for download from my web site at http://sb.fluomedia.org/download/ What does it do: ---------------- This package contains a pair of complementary filters for converting special characters (with ASCII codes ranging from 0x80 to 0xFF) from the "ISO-Latin-1" (same as "ISO-8859-1") character set to one of the "CP 850" PC character sets (and vice-versa) in a REVERSIBLE way WITHOUT LOSSES of information. These filters thereby try to provide a "best possible" translation, i.e., all characters that are visually the same or very similar in both character sets are converted into one another, which should give a pretty well readable translation of any text containing special international characters. Moreover, some of the characters without visual equivalent in the other character set are converted anyway (where necessary) to some arbitrary character, in order to assure that EVERY character in the character set has a UNIQUE equivalent (in order to assure the invertibility of the translation table used by these filters and thus the reversibility of the transformation performed by these filters). The filters thereby try to convert as little of these characters without visual equivalent as possible in order to produce as little "distortions" in the filtered text as possible. Characters affected by the translation of these filters are the ones with ASCII codes ranging from 0x80 to 0xFF, all other characters are simply passed through. Input comes from standard input, output goes to standard output. Both can be redirected to/from files using the corresponding redirection operators (">", ">>" and "<", respectively). These filters can therefore be used on any platform that provides a standard ANSI C compiler and where redirection of standard input/output is possible. Available command line options are: -v reverse the conversion (use inverse translation table) -d use "dos" character set (used by older MS-DOS versions and the FreeBSD "SCO" console, for instance) (DEFAULT) -w use "win" character set (used by newer MS-DOS versions and the Windows NT/95 MS-DOS command shell) -n "neutral" or "no operation" - simply pass through all characters (overrides "-v", "-d" and "-w") -vd use "dos" character set, reverse conversion -dv use "dos" character set, reverse conversion -vw use "win" character set, reverse conversion -wv use "win" character set, reverse conversion -rev reverse the conversion -dos use "dos" character set (DEFAULT) -win use "win" character set -nop simply pass through all characters -dump dump the internal translation table (can be combined with "-v" or "-rev" to dump the inverse translation table) instead of performing any conversion (override) -init initialize the translation table first before dumping it (this option has no effect if "-dump" is not present) The last options on the command line take precedence over the first ones, where applicable. "-v" and "-rev" are toggle switches, i.e., specifying this option twice is the same as not specifying it at all. How to build and install: ------------------------- Just compile the two "*.c" files in this package with your favourite ANSI C compiler, for instance: > gcc -ansi -O2 -o iso2pc iso2pc.c > gcc -ansi -O2 -o pc2iso pc2iso.c Then copy the resulting binaries to some directory in your search path ("/usr/local/bin" or "C:\DOS", for example). If you don't want to type so many options, you can also use > perl compile.pl iso2pc (all platforms) > perl compile.pl iso2pc (all platforms) > ./compile.sh iso2pc (UNIX) > ./compile.sh pc2iso (UNIX) > compile iso2pc (DOS/WinNT/95) > compile pc2iso (DOS/WinNT/95) instead for compiling these two source files. Note that "compile.sh" assumes "gcc" to be your ANSI C compiler and "compile.bat" assumes "cl", whereas "compile.pl" uses the same compiler that Perl itself has been compiled with. Legal issues: ------------- This package with all its parts is Copyright (c) 1998 by Steffen Beyer. All rights reserved. This package is free software; you can redistribute it and/or modify it under the terms of the "GNU General Public License". Please refer to the file "GNU_GPL.txt" in this distribution for details! Author's note: -------------- I hope you will find this package beneficial! Share and enjoy! Yours, -- Steffen Beyer http://sb.fluomedia.org/ "There is enough for the need of everyone in this world, but not for the greed of everyone." - Mahatma Gandhi