Re: One key stroke --> two code-points



Thanks Simos !!

Actually, we have had these additions for a while in X11.

We will  do an issue for GTK+, and use the variable meanwhile.

What file is it in GTK+? I have not been able to find it.

Thanks,

Javier

Simos Xenitellis wrote
O/H Javier SOLA έγραψε:
Hi,

I am working on Khmer localization (KhmerOS project).

In Khmer, some of the basic vowels (which we include in the keyboard) require two code-points, so one keystroke must generate two code points.

It used to be that we could do the conversion in KBX by generating a fictious code-point (Pablo Saratxaga explained this to us a few years ago), which was later translated to two real code-points by puting the conversion in the en-US locale file. I did work at the time.

But now this seems to have stopped working. Does anybody knows how we can fix this?
These additions (pressing a single key and producing two codepoints), are located at
/usr/share/X11/locale/en_US.UTF-8/Compose
The specific lines appear to be

# Khmer digraphs
# A keystroke has to generate several characters, so they are defined
# in this file

<U17fb>    :   "ុះ"
<U17fc>    :   "ុំ"
<U17fd>    :   "េះ"
<U17fe>    :   "ោះ"
<U17ff>    :   "ាំ"

GTK+ based applications duplicate the Compose file in the gtk+ library, and currently the version of the Compose file that exists in gtk+ does not include those specific compose sequences.
I think these are a recent addition.
Technically, it is possible for gtk+ to include compose sequences that produce more than one code points (requires small change in the code), however these recent Khmer digraphs are the only compose sequences using the facility now.

To cut the long story short, you can bypass for now the GTK+ version of the Compose file and use the Compose file that comes with X.Org (shown above) by setting the environment variable GTK_IM_MODULE to "xim".
This should not have adverse effect to the OLPC software.

It is important that if other keyboard layouts as well require compose sequences that produce two or more codepoints (such as Serbian), to add them to the XOrg Compose file. In the next iteration of update of the GTK+, all these compose sequences can make it in.

Simos






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