Subject: Building blocks of Chinese programs

From: Ng Liang Shing <[email-masked]>
Date: Sat, 24 Sep 1994 22:43:17 MYT

Bulding Blocks of Chinese programs

For those who wish to write their own Chinese system to replace C-Star or
Eten, and those who simply wish to know how Chinese system works, and those
who wish to write some good Chinese application programs,

A friend of mine who recently join Internet (Mr. Ooi <[email-masked]>) told me
some problems he faced when writing customised database programs for his
Chinese customers. One is that most users (here in Malaysia) does not have a
Chinese system like Eten preinstalled on their PC. So they would have to
install Eten/ZhenHan system just to run his database programs. This cost is
added to the cost of his programs. If the program can run without a Chinese
system like Eten/Zhenhan, then it would be easier to sell his program because
it is cheaper. The other problem is that users have different version of
Chinese system that uses different character set. This causes severe
compatibility problem. To suit the needs of the customer, he would need to
write different version of the same program because his programs must run on
the users' Chinese system. We thinks that if the Chinese functions can be
compiled into his programs, then his program will not need to run on top of
any Chinese system, thus eliminating the compatibility problem altogether.

The second problem reminded me of a newspaper article several weeks ago in a
local newspaper (XingZhouRiBao). It is about the announcement of People's
Republic of China National Standard for Chinese System. (CNSCS, or whatever it
is called on the net.) In conjunction with this is the launch of Chinese
version of MS-DOS 6.22, which is the first Chinese System to comply with
CNSCS. The aim of CNSCS is to establish a standard for Chinese System, such
that to eliminate compatibility problems between Chinese systems.
Consequently, application development will be much easier. Details about the
CNSCS was not available here. (Any where?)

My first impression is that this standard should be there ten years ago. It is
ten years late now.

My second impression is that the majority (represented by the National
Standard organisation) is still stuck with the conventional architecture of
Chinese systems - Chinese applications must run on top of a Chinese system.
There are two biases of the conventional architecture - first, the Chinese
system is a third party system program (Eten,CStar); second, the Chinese
system is built in the operating system (Chinese MS-DOS 6.22, Chinese
MS-Windows).

An alternative to the conventional architecture consitutes of Chinese
applications running without a Chinese system. This is a universal solution.
Because the applications is independent of the Chinese system, the
applications will run if a Chinese system is not present, or even if the
Chinese system is present, and because of its independence, the applications
will also run. This type of application programs will be suitable outside
China. It is also suitable in China, because it could run on top of a Chinese
system though it does not need to access it. An example is NJSTAR, my
favourite word processing program.

The alternative architecture is still a minor stream at the moment. But it
should have very large potential to grow. Programs like Mosaic should adopt
this architecture to enable Chinese processing. Mosaic is an Internet browser.
On the Internet there are many languages. To process multiple languages,
Mosaic should be equiped with functions that process multiple languages.
Mosaic must be portable across all platform.  If Mosaic depends on an external
Chinese system for Chinese processing, then it won't be portable across all
platform. The same argument applies to other application programs.

To implement the alternative architecture, there should be a Chinese function
library that can be used when compiling or running the program. So the Chinese
functions will become part of the program. Then the program will be able to
process Chinese characters when it is run. The aim of the alternative
architecture are firstly to cut cost and secondly to eliminate dependency and
incompatibility.

The important building blocks in a Chinese function library are character
input and output functions. Imagine, to process ASCII, we need to have
printf() and scanf(). So to process Chinese characters, we need to have the
Chinese equivalent of printf() and scanf() too.

Because Chinese character processing is more complicated, we can imagine that
the Chinese scanf() and printf() is more complicated than its ASCII
counterpart.

Next, we shall see how complicated the Chinese scanf() is such that it
requires object oriented programming techniques so as to implement it
efficiently.

part I ... to be continued .....

--
Ng Liang Shing            |   This is an Internet node host inside
Sungai Petani, Malaysia   |   an old 286.  A few years back, this place
[email-masked]          |   was not more than a small town.