Re: How to create Unicode input methods for MacOS? (long)

From: Sebastian Hagedorn (
Date: Fri Apr 21 2000 - 12:29:32 EDT

Hello, again!

Thanks for the help so far. I spent the better part of today trying to get
my head around the 'uchr' format. To that end I tried to understand the
Extended Roman (U) 'uchr' resource. I've succeeded for the most part, but
there remain a few aspects that I don't comprehend.

Probably these questions really aren't appropriate for this list, but I
don't know where else I could ask them. I'm open for suggestions...

-- Deborah Goldsmith <> is rumored to have mumbled on
Montag, 17. April 2000 12:30 Uhr -0800 regarding Re: How to create Unicode
input methods for MacOS? (long):

> Our 'uchr' resources are created using an assembler. It's the only tool we
> are aware of that can fill in the offsets the 'uchr' data structure
> contains. We don't have a custom 'uchr' editing tool at this point (we
> would love to have one...).

Count me in! :-) First I thought that I could create a TMPL for ResEdit or
Resorcerer, but then I realized that that won't be possible. Writing a
parser for the 'uchr' format shouldn't be too hard, but writing a generator
is definitely out of my reach.

>> My custom 'uchr' should have a negative ID if I don't want to
>> associate it with a script. Do I have to reserve the ID I want to use
>> like I have to do with creator codes?
> I don't believe so. Resource ID conflicts should be resolved either by an
> installer or when you drag it into the System file.

Hmm, I don't want to put the cart before the horse, but if I managed to
create a 'uchr' resource, what file type and creator would I have to use to
be able to install it by dragging it to the System file?

Now for the meatier stuff: I don't really understand the relationship
between the 'UCKeyModifiersToTableNum' structure and the
'UCKeyToCharTableIndex' structure. Taking the Extended Roman example, there
are 112 modifier key combinations that are mapped to 8 different tables. I
guess these 8 tables are similar to the ones in a KCHR resource. What I
don't get is how I know which modifier key combination is mapped to which
table, i.e. how do I know which modifier keys are pressed for the first of
the 112 entries, for the second etc.

The tables with the actual UCKeyOutput values are also somewhat baffling. I
understand the distinction between the 3 different kinds of values these
can be, but even the simple Unicode characters confuse me. When I noticed
that the ciphers appear in the order 1 2 3 4 6 5 I remembered that they
appear in this order in ResEdit's KCHR editor as well. The (virtual?) key
codes there seem to correspond to the ones in the uchr table, but only for
the ciphers. The other code points don't always seem to point to state
records or character sequences, but they also don't give values for plain
Roman characters, as I would've expected (c.f. offset 178 ff.).

Am I missing something obvious or is this even more complicated than I
think it is?

Thanks, Sebastian

Sebastian Hagedorn
Ehrenfeldgürtel 156, 50823 Köln, Germany

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:02 EDT