Subject: Re: Displaying Chinese Characters in Smaltalk

From: POUILLES Albin <[email-masked]>
Date: Fri, 29 Mar 1996 09:58:08 +0100

Manyi Lu wrote:
>
> On Thu, 28 Mar 1996, ZUCKER Jean-Daniel 45.55.63.38 wrote:
>
> > Dear Netters,
> >
> > I would like to know if anyonne has had the experience of
> > displaying chinese characters in smaltalk (in GB). If so what fonts
> > do I need to download.
>
>  I have the same problem, but in c/c++. I have never done any chinese
> programming before, but found it very interesting, where should I start?
>
>   Thanks in advance.
>
>    Manyi Lu
Hello,

Displaying chinese characters is not a problem specifically due to the
programming language you use. One chinese character is encoded in 2
bytes. You need to be able, through the programming language, to send
these two bytes to the display interface. For example, you can have
a two character character-string containing the character you want to display.

All you need then, is when you "print" this 2 byte character string :

- The programming language does not filter the left-most bit, nor add
a carriage return

- the display environnement is able to display the character, i.e.
have the corresponding chinese font.

For example, under X-Window, the XDrawText function prints a character
string, but to print double byte encoded characters, you have to use
XDrawText16.

So, if the language does not provide functions for 2-byte encoded characters,
you have to check if you display environement provides it,
find the function in the display lobrary that enables you to do it
and interface it with your program.

Well, this is just a rough idea to get you started.

Best regards

Albin Pouilles

--
[email-masked]

                      _\\|//-
                      ( 0-0 )
-------------------o00--(_)--00o------------------

                   .oooO
                   (   )   Oooo.
--------------------\ (----(   )------------------
                     \_)    ) /
                           (_/