Subject: CNS (7-bit) <-> Big5 converter uploaded to ifcss.org

From: Jing-Shin Chang <[email-masked]>

Dear CCNET netters,

The 7-bit CNS code <-> Big5 code conversion program, as promised in
one of my previous posting is now uploaded to ifcss.org:/incoming
as "(00)ChnCodeFilter-1.4.tar.Z". If you are interested in this package,
please download it from the /incoming directory or from the directory
announced by the ifcss.org administrator.

Note: currently, two tar files are uploaded in /incoming:

        ChnCodeFilter-1.4.tar.Z and 00ChnCodeFilter-1.4.tar.Z.

The latter is a more recent upload. Please get this file and
rename it as ChnCodeFilter-1.4.tar.Z in your local host. Sorry
for such inconvenience since I cannot delete the earlier upload.
The README.1st file is attached at the end of this email. If you
had an official distribution of the "chcode" package from iiidns.
iii.org.tw, you may want to get a copy of this modified version
as a substitute.

I will later post some information on how the CNS messages are passed
through the net as used in Taiwan and similar encoding schemes.
Sorry for not posting such information earlier since I was busy with
two of my final papers, which are due 05/01.

Best.

        Shin -^^-
====
#
# @(#)$Id: README.1st,v 1.1 1994/04/30 22:48:11 shin Exp $
#
#       Jing-Shin Chang
#       Department of Electrical Engineering
#       National Tsing-Hua University
#       Hsinchu, Taiwan 30043, ROC.
#
#       email: [email-masked]
#
This is a code conversion package for converting among several
commonly used Chinese coding system in Taiwan, ROC. The original
source is distributed by the Institute for Information Industry
(III), Taiwan, ROC.

** See the copyright statements in the "ccvt.c" file first. **

The interface of the original distribution had been modified so
that it could be used as a filter for character streams from
standard input and to standard output.

A few bugs are also fixed to avoid alignment problems when compiled
in different platforms.

[How to make the execution file]

(1) to use the filter version, just type

        make ccf

(2) to use the original interface, type

        make chcode

[How to get a help message]

Type 'ccf' or 'chcode' without arguments to get a brief introduction to
the usage.

Typical examples:

        ccf -be big5file eucfile        # big5 -> EUC
        ccf -eb eucfile | more          # view an EUC file with a Big5 terminal
        zcat eucfile.Z | ccf -eb | more # view a compressed EUC file
                                        # convert a compressed EUC file
        zcat eucfile.Z | ccf -eb - big5file

[File List]

        README.1st      - the current document you are reading
        ccf.1           - nroff man page

        Makefile        - make file for the package
        ccf.c           - main program
        ccvt.c          - code conversion functions (**)
        util.c          - small utility functions

        README          - original README in the official distribution
        chcode.doc      - original official document

        test.b5         - a small test file in Big5
        test.5550       - an IBM5550 file
        test.euc        - an EUC file
        test.cns        - a CNS file
        test.p          - a 7-bit CNS file used for newsgroup posting
        DIFF.ccvt       - major diffs between ccvt.c and code.c in official
                                distribution
                        (* See "Differences ..." in the following section.)

[Differences with the official distribution]

0. Currently, the official distribution is archived in the ftp site:

        iiidns.iii.org.tw(140.92.1.45):/pub/seed/chcode

and several other SeedNet servers.

1. The order of some typedefs and #defines are not the same, because
        the current modified version is acquired from a different
        revision.

2. Put4Byte(), Get4Byte(), GetNSCPcode(), GetIBMHcode() are fixed for
        alignment errors.

3. main() is modified as a filter.

        ** WARNING **

4. The definitions for SS2, SS3, LS2, LS3 codes and their management in
        GetNSCPcode() are different. My version agree with the document
        "README" and "chcode.doc". Furthermore, by testing some SeedNet
        news, I found that the official distribution cannot convert some
        graphic symbols (such as those box drawing symbols) correctly
        while my version can. Therefore, this version might be a better
        choice. (I had used it for quite a long time without serious
        problems.)

        Don't blame me because both versions are III's distributions.

5. The Alter() function is allowed to be compiled for passing input
        string length explicitly. Normally, you don't need to care
        about this.

6. One statement, which determines the code plane, is not the same
        in both version.

7. Most variables and functions in the current version use static variables.
        The official version does not.

8. See other differences in DIFF.ccvt (including bug fixing parts.)
        Uninterested diffs are removed.

[Platforms Tested]

        Sun-3/SunOS 4.0.3
        Sun Sparc Stations/SunOS 4.1.1
        IBM RS6000/AIX 3.2