Subject: miscellaneous: Big5 news, gopher, web, HZ+S

From: Stephen G Simpson <[email-masked]>

Ya-Gui writes:
 > The Taiwan site that provide a.c.t and a.c.t.big5 cross-mirroring
 > is also providing an HZ hook-up to Taiwan's big5 newsgroups. If
 > the user was refering to those services, then he was not reading
 > Big5 directly.

Ah!  That could be the explanation.  I was surprised when this guy
told me that ZWDOS supports Big5.  Sorry for not checking my facts.

 > I myself am not able to read Big5 gopher sites because my local
 > gopher client is not 8-bit clean and I don't want to bother to
 > recompile it myself.

I use the Emacs Gopher and World Wide Web clients, gopher.el and
w3.el.  They work under cxterm in Big5 mode (or on a PC running ETen
or KC) to access Big5 Gopher and Web servers in Taiwan.  The links
are in my WWW home page, last line of my signature below.

Text-based Gopher and Web clients on a Chinese terminal are better
than Mosaic-L10N in some ways.  It's hard to use the on-line
Chinese->English dictionary via Mosaic-L10N, because Mosaic-L10N
doesn't give you a good way to type in the Chinese word that you want
to look up.

 > BTW, could you post your Big5<->HZS conversion algorithm?

The programs are at ftp.math.psu.edu, /pub/simpson/chinese/hzps.  They
are lightly hacked versions of Fung's GB <-> HZ converters.  At this
point in time they are essentially untested.  The Big5 -> HZ+S routine
is

     big2hzp(b1, b2, a1, a2)
         int b1, b2, *a1, *a2;
     {
         unsigned long n;

         n = 157 * ((b1 < 0xC9) ? (b1 - 0xA1) : (b1 - 0xC9))
                + ((b2 < 0xA1) ? (b2 - 0x40) : (b2 - 0xA1 + 63));

         *a1 = 0x21 + (int) (n / 94);

         *a2 = 0x21 + (int) (n % 94);
     }

and the HZ+S -> Big5 routine is

     hzp2big(p, a1, a2, b1, b2)
         int p, a1, a2, *b1, *b2;
     {
         unsigned long n;
         int r;

         n = 94 * (a1 - 0x21) + (a2 - 0x21);

         *b1 = ((p == 1) ? 0xA1 : 0xC9) + (int) (n / 157);

         r = (int) n % 157;

         *b2 = ((r < 63) ? (0x40 + r) : (0xA1 + r - 63));
     }

I hope I've got these algorithms right -- I haven't had time to test them.

-- Steve

Stephen G. Simpson
Department of Mathematics, Pennsylvania State University
333 McAllister Building, University Park, State College, PA 16802
Office phone +1 814 863-0775     Home phone +1 814 238-2274
E-mail [email-masked]      FAX +1 814 865-3735
World Wide Web http://www.math.psu.edu/simpson/