Subject: Single Byte Chinese Patching System

From: Ng Liang Shing <[email-masked]>
Date: Fri, 19 Aug 1994 12:25:45 MYT

TopBridge Superwin

Has anyone used TopBridge Superwin Chinese System for Windows?

I recently read an article on the newspaper (Sin Chiew Jit Poh, Malaysia,
Thursday, 18-8-94) about it.  As claimed, it is a Chinese Character Patching
System, i.e.  similar to Chinese Star for Windows.  In other words, it
modifies the Character I/O Subsystem of Windows so as to enable Chinese
Character I/O.

A related product is the TopFont, it is a single byte encoded Chinese font.

The main feature of Superwin is singel byte encoded Chinese characters.

It is sold at $98.00 (Malaysian Dollar), equivalent to US$40. It is a Canadian
product.

How Single Byte Encoding works?

This is how I guess single byte encoding works.

As we know, there are about 7000 characters in the Guobiao set and 13000
characters in the Big5 set. To represent a character uniquely, we need two
bytes (16 bits).

Conventional Chinese patcher systems uses double byte encoding. Double byte
encoding is not fully compatible with non-Chinese applications. By way of
example, in a non-Chinese wordprocessing systems, which is patched for
Chinese, reformatting paragraph sometimes causes split character - the two
bytes representing a Chinese character is separated. In conventional Chinese
patcher system, each Chinese character in the active session is represented by
two bytes. By active session, for example, I mean a document opened by a
wordprocessor.

To achieve full compatibility with non-Chinese applications, it is necessary
to encode Chinese character using one byte, at least in the active session.
But how can we uniquely define a Chinese character using one byte? I think the
secret is that

**** for each character or byte in the active session, the
**** Chinese patcher stored the other corresponding byte in a background
**** session.

The active session is owned by the running non-Chinese application.  The
background session is owned by the Chinese patcher system.

By way of example using the hypothetical wordprocessing systems again, we can
now reformat a paragraph without worrying about split character, because
single byte will not be seperated.

This however result in some other complications. For example, when saving the
active session as a file directly, only one byte for each character will be
saved. The other byte in the background session will be lost. To overcome
this, the Chinese patcher systems must also patch the file handle/stream
functions. For example, when saving a file, the patcher must insert the
background character after each character in the active session. When
retrieving a file, the patcher must 'steal' a byte from the active session.

Conclusion

My guess is that single byte encoding is achieved using the method mentioned
above. Conventional Chinese patcher only patches the Character I/O subsystem.
Now I think the new Superwin Chinese systems has achieve patching the file
stream/handle functions.  This is undoubtedly a step forward in the art of
Chinese patching system.  It is I think the state of the art of Chinese
patchers.  However, as far as formal software engineering is concerned,
Chinese patcher systems are not the proper practice.

Comments welcome.
--
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.

---

From: James Lin <[email-masked]>
Date: Mon, 22 Aug 1994 16:56:18 -0700

> **** Chinese patcher stored the other corresponding byte in a background

It is not like what you mentioned.  Basically, SuperWin turns a CHinese
typeface info about 60 or even more single byte TTF - just like the way
you implement a double byte format 2 cmap table.

So, when you do the input, SuperWin will first determine which single
byte TTF and what code space it should put into the document.  It's just
that simple.

> saved. The other byte in the background session will be lost. To overcome

Well, the document is still a very normal document, all the characters
are normal.  You can simply open the document without any other help even
without SuperWin running.

> Chinese patching system.  It is I think the state of the art of Chinese

Hard to say it is a step forward or a step backard.  This technique is
not new and it is a good question to ask why similar vendor does not use
it.  Actually, there are many reasons involved so even Top does not take
it at the first place.

/James Lin