tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Default X i18n configuration for UTF-8 locales references non-existent modules


I'm running NetBSD-5.0 release with native from the base system
on i386, and I've noticed the default X i18n settings for the UTF-8
locales are non-working since they point to non-existent modules. It
seems several other people have noticed the effects too, in a form or
another; it is related to PR #41129.[1][2] Is there a reason to these

The problematic file, used by all UTF-8 locales, is
${XSRC}/external/mit/libX11/dist/nls/en_US.UTF-8/XI18N_OBJS (which
installs to /usr/X11R7/lib/X11/locale/en_US.UTF-8/XI18N_OBJS):

    #   XI18N objects table for euro locales
    XLC common/xlcUTF8Load      _XlcUtf8Loader          # XLC_open
    XOM common/xomLTRTTB        _XomGenericOpenOM       # XOM_open
    XIM common/xiiimp           _SwitchOpenIM           # XIM_open
    XIM common/xiiimp           _XimpLocalOpenIM        # XIM_open

A web search seems to indicate that the XOM and XIM modules listed are
not provided by and are Solaris-specific.[3]

On my setup, I have replaced them with (only) modules, which are
used by non-UTF-8 locales (ximcp for XIM and xomGeneric for XOM).
I don't know whether they support all Unicode specifics, but at least
they exist. Here's the patch:

    --- a/XI18N_OBJS    2008-07-30 04:43:01.000000000 +0200
    +++ b/XI18N_OBJS    2009-06-06 19:09:30.000000000 +0200
    @@ -3,6 +3,8 @@
     #      XI18N objects table for euro locales
     XLC    common/xlcUTF8Load      _XlcUtf8Loader          # XLC_open
    -XOM    common/xomLTRTTB        _XomGenericOpenOM       # XOM_open
    -XIM    common/xiiimp           _SwitchOpenIM           # XIM_open
    -XIM    common/xiiimp           _XimpLocalOpenIM        # XIM_open
    +#XOM   common/xomLTRTTB        _XomGenericOpenOM       # XOM_open
    +XOM    common/xomGeneric       _XomGenericOpenOM       # XOM_open
    +#XIM   common/xiiimp           _SwitchOpenIM           # XIM_open
    +#XIM   common/xiiimp           _XimpLocalOpenIM        # XIM_open
    +XIM    common/ximcp            _XimOpenIM 
_XimRegisterIMInstantiateCallback  _XimUnRegisterIMInstantiateCallback       # 
XIM_open      XIM_register XIM_unregister

For me, things work fine with these settings: X applications
(including twm) using base X fonts can now create fontsets, xterm does
not complain about the input method anymore, and dead key composition
are handled normally by the X server (e.g. dead keys work in Emacs
without having to resort to iso-transl).

The problem does not appear to be NetBSD-specific since at least two
major Linux distros I have checked (Gentoo, Debian) have identical
configurations, yet work fine with UTF-8. They appear to lack the
shared libraries for X i18n modules altogether, which would mean their
libX11 was compiled without dynamic i18n module support (if that is at
all possible). That would be another solution, I guess.


Nhat Minh

Home | Main Index | Thread Index | Old Index