Subject: Cangjie Table : XinCang

From: "L.S.Ng" <[email-masked]>
Date: Thu, 1 Apr 1993 16:36:25 BST

Dear CCnet,

XinCang - Cangjie Table for Jiantizi by Liang Shing Ng @1993
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*************
(Note square brackets [] denote Cangjie code)

This table is produced by Liang Shing Ng, based on Cangjie of
Fantizi and Cangjie of Jiantizi. Reference packages were Eten for
FanCang and JuZen for JianCang.

DISCLAIMER
-----------
NJINPUTX.DIC AND REGEN.BAS WILL BE KNOWN AS 'THE PACKAGE'
HEREAFTER.
SOME BUGS IN THE CANGJIE TABLE/REGEN.BAS SHOULD BE EXPECTED.
I DISCLAIM WARRANTY UPON ANY DAMAGE/LOSSES IN ANY FORM CAUSED BY
USER USING THIS PACKAGE.
-------------------------------------------------------------------

Differences from previous Cangjie
**********************************
I have made a few minor refinements to the Cangjie codes of the
above mentioned packages. I hope it is acceptable and I would like
to hear your feedback.

Here I list all the refinements made:

1. To solve for repeated code, X was used AFTER the normal code.
   e.g. wei4 (not yet) [JD] , sung4 (a dynasty) [JDX]
   In case there is a second repeated code use [XX] and so on for
successive repeated code. But this is rare.

2. Cang2yong4fu4he2zi4 ( Commonly used characters ) now include Ye4
(Page) whose CJ code used to be [MBC] in fancang and [MBO] in
jiancang, now it is [MO] when used as parts but [MBO] when alone.

3. Ge (elder brother) is now [MRDR] instead of [MRNR]

Reason for making such refinements:

1. User never realise if a character has a repeated code. If X
prefixes the code, user often have to retype. With X suffixes the
code, he/she will realise it when the code is type, by looking at
the characters displayed at the bottom of the screen, and it just
requires an extra X. Note that the feature of displaying character
before space-bar is pressed is not found in both Eten and JuZen.
NJSTAR has it and so does other good word-processor.

Limitation exists when the repeated code itself is five characters
long. In this case, user have to use Digit to select from a list.
However such list comprise normally 2 characters only with the
commoner character in the first place. User need not type 1 as
pressing space bar will suffice. Note that there are less than five
of such character-code out of nearly seven thousand GB character.

2. Conventionally, cangyong fuhezi includes Gui3 (ghost) [HI] and
[OG]. In fact Ye4 (page) [MBO] has a very high frequency and often
acts as bu4shou3.

3. This is more reasonable than [MRNR].

-------------------------------------------------------------------

The format of the Cangjie Table NJINPUTX.DIC and regenerating the
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
table in ASCII/GB format
************************
I formatted the Cangjie table using NJSTAR INPUTDIC. I uuencoded it
for posting. When you have received and uudecoded it, it is a
binary file of 27200 bytes long. This can be used directly for
NJSTAR. I used this format because it is the most compact one.
PKZIP can't achieve smaller size.

I also include a QBASIC program REGEN.BAS here to REGENERATE the
CangJie Table in ASCII/GB format. The regenerated table lists the
Cangjie code as lowercase A-Z in the first column and the
corresponding character in GB in the second column. Due to some
programming constraint, shorter code will have trailing ` (asc
value 96). You can replace it with white-space easily using any
word processor.
-------------------------------------------------------------------
BUGS REPORTING
--------------
As you are able to regenerate the Cangjie table, so if you find any
bugs in it, don't hesitate to correct it yourself and inform me if
you so wishes.
-------------------------------------------------------------------

The uuencoded canjie table will be posted seperately to those who
have made a request. Be warned, its size is about 40Kbytes.

I include REGEN.BAS here.

-----REGEN.BAS-----
DECLARE FUNCTION i$ (j&)
OPEN "njinputx.dic" FOR BINARY AS #1
OPEN "njinputx.gb" FOR OUTPUT AS #2

FOR h = &HB0 TO &HF7
FOR l = &HA1 TO &HFE
p = ((h - &HB0) * 94 + (l - &HA1)) * 4 + &H6D
GET #1, p, t&
PRINT #2, i$(t&) + " " + CHR$(h) + CHR$(l)
NEXT
NEXT

CLOSE

FUNCTION i$ (j&)
a& = j& \ 14348907: r& = j& MOD 14348907
b& = r& \ 531441: r& = r& MOD 531441
c& = r& \ 19683: r& = r& MOD 19683
d& = r& \ 729: r& = r& MOD 729
e& = r& \ 27
i$ = CHR$(a& + 96) + CHR$(b& + 96) + CHR$(c& + 96) + CHR$(d& + 96)
+ CHR$(e& + 96)
END FUNCTION

----END OF REGEN.BAS--------

Thank you
Liangshing Ng
31-3-93