I18N text (Input methods?)

Hi all,
I was wondering if anyone had a basic FAQ/HOWTO/etc on how a program deals
with entering i18n text (Asian, non-ASCII, etc, etc).  Or perhaps, can you
refer me to a program that I could look at/try as an example?

As I see it, there are two parts:
 1) The program implementation must be prepared for it (Unicode data
    structures, gdk_im_* calls, etc, etc)
 2) The user has to get their text into the program (compose sequences,
    character selector tools, etc)

We're developing mapping software, and already have our own text-rendering
mechanisms in place, using a combination of ICU, Freetype, GTK, and a
bunch of our own stuff.  This works well, once we have the Unicode
characters to process.

We also have the basic input mechanism in place, whereby be pick up the
key presses in the drawing area, get the byte (Should that be bytes?) out
(from the GdkEventKey.string), and process it from there.  We render it
right on the screen in real-time, according to our layout mechanisms
(curved, rotated, irregular, etc)

Unfortunately, I'm kindof unsure how to proceed from here...
I look down at my latin keyboard, knowing that my program will display
Chinese (for example), if I only knew how to get the Unicode bytes into
it...  :-(

I've been looking at the GTK Input Methods/Input Context stuff, and a
couple of thoughts come to mind:
- First, a lot of it seems to be for handling presentation/rendering
  (especially stuff like GdkICAttr), which I don't think(?) I need,
  since we're rendering it ourselves.  I think I just need to get the
  Unicode text out of it.
- I'm still not sure what the user does to enter their text...  (ie What
  they see/do, can they enter any Unicode text, or only data from their
  current locale, etc).

I know that I can pop-up a dialog, and let the user type their Unicode
string into that, and then feed it into the lower-level stuff.  However,
it'd be nice (if possible) to let them type directly on the screen, as
we do with the ASCII/Latin text...

Anyways, sorry for the long-windedness of this ("This is so long because I
don't have the time to make it shorter" ;-), but I'm just not sure how
to proceed.  (It probably doesn't help that I've never worked in foreign
language on a computer, so I'm not sure what a user typically does or

Thanks for any/all info!

[ PS - Ideally, I'd like to be doing this in GTK 1.2, if possible... ]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]