Japanese Internationalization on Red Hat Linux 9 - Motif

This is a discussion on Japanese Internationalization on Red Hat Linux 9 - Motif ; I am trying to internationalize an application for Red Hat Linux 9 Japanese. There are two problems with internationalizing the GUI. 1) My GUI will not accept Japanese input: The other apps running on my machine such as emacs, xterm, ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Japanese Internationalization on Red Hat Linux 9

  1. Japanese Internationalization on Red Hat Linux 9

    I am trying to internationalize an application for Red Hat Linux 9
    Japanese. There are two problems with internationalizing the GUI.

    1) My GUI will not accept Japanese input: The other apps running on my
    machine such as emacs, xterm, and mozilla accept Japanese input when I
    hit shift+space on the keyboard. The front end processor used in this
    case is kinput2. On my GUIs, shift+space only outputs a space and does
    not turn on the Japanese input.

    2) My text widgets are unable to render Japanese characters properly:
    I have changed the fonts so that the ones selected have Japanese in
    them. The ASCII portion of the strings appear fine but the Japanese
    portions are garbage. Some of the other widgets used in my GUI can
    show the Japanese characters with no problems. I have been told that
    this may be an issue with the motif, that the Japenese function needs
    to be turned on or something. Here are the motif packages that are
    installed on my machine:

    openmotif-2.2.2-14
    openmotif-devel-2.2.2-14
    openmotif21-2.1.30-8

    Does anyone know how to resolve these issues? Any help would be
    appreciated. Thanks!

  2. Re: Japanese Internationalization on Red Hat Linux 9

    doc_holliday1_2000@yahoo.com (Ben) writes:

    > I am trying to internationalize an application for Red Hat Linux 9
    > Japanese. There are two problems with internationalizing the GUI.


    At least 3 fonts are needed for rendering Japanese texts on motif: i.e.,
    iso8859, jisx0201.1976 and jisx0201.1983 fonts.
    Try the attatch program to input/output Japanese text.
    When you execte this program,
    1. set environment variable LANG to ja_JP.eucJP:
    % setenv LANG ja_JP.eucJP
    2. set environment variable XMODIFIERS of the input method to kinput2:
    % setenv XMODIFIERS @im=kinput2
    3. set fontList resource of Text widget:
    *fontList: -*-fixed-medium-r-normal--16-*-*-*-*-*-*-*:
    (or *fontList: a14;k14;r14
    Note that the last charcter ":" of font names is needed for fontList.

    #include
    int main(int c, char **v)
    {
    XtAppContext context;
    Widget toplevel, text;
    XtSetLanguageProc(NULL, NULL, NULL);
    toplevel = XtAppInitialize(&context, v[0], NULL, 0, &c, v, NULL, NULL, 0);
    text = XtVaCreateManagedWidget("Test", xmTextWidgetClass, toplevel, NULL);
    XtRealizeWidget(toplevel);
    XtAppMainLoop(context);
    return 0;
    }
    ---------------------------------------------------------------------
    tesigana@mtf.biglobe.ne.jp

  3. Re: Japanese Internationalization on Red Hat Linux 9

    tesigana@mtf.biglobe.ne.jp wrote:

    >>I am trying to internationalize an application for Red Hat Linux 9
    >>Japanese. There are two problems with internationalizing the GUI.

    >
    >
    > At least 3 fonts are needed for rendering Japanese texts on motif: i.e.,
    > iso8859, jisx0201.1976 and jisx0201.1983 fonts.
    > Try the attatch program to input/output Japanese text.
    > When you execte this program,
    > 1. set environment variable LANG to ja_JP.eucJP:
    > % setenv LANG ja_JP.eucJP
    > 2. set environment variable XMODIFIERS of the input method to kinput2:
    > % setenv XMODIFIERS @im=kinput2
    > 3. set fontList resource of Text widget:
    > *fontList: -*-fixed-medium-r-normal--16-*-*-*-*-*-*-*:
    > (or *fontList: a14;k14;r14
    > Note that the last charcter ":" of font names is needed for fontList.


    Great. I once experienced another problem with the ja_JP.eucJP localization -
    FileSelectionBox dialogs didn't allow files to be selected, and adding the
    colon at the end of the fonList value solved it, which I didn't quite
    understand. Why does the ":" char matters if no tag follows it?

    Regards,

    Evgeny


  4. Re: Japanese Internationalization on Red Hat Linux 9

    Adding the ":" at the end of the specified font worked wonders in
    terms of rendering the Japanese characters. Thanks Tesigana!

    I am still having some problems with Japanese input. I have set the
    LANG and XMODIFIERS as suggested and now many of my GUIs are now
    capable of Japanese input. However some of them still do not respond
    to the shift+space. I noticed those editable text boxes can now
    display Japanese characters and I can even paste Japanese characters
    in them but typing Japanese characters directly into them is not
    possible.

    Also some of my GUIs now have an extra box running horizontally along
    the bottom of the them. It is similar in look to the buffer space
    found at the bottom of emacs windows. When I type shift+space I get a
    hiragana "a" in the box which indicates I am in Japanese input mode.
    Why do some of my GUIs have this and others do not?

  5. Re: Japanese Internationalization on Red Hat Linux 9

    Evgeny Stambulchik writes:

    >> *fontList: -*-fixed-medium-r-normal--16-*-*-*-*-*-*-*:
    >> (or *fontList: a14;k14;r14
    >> Note that the last charcter ":" of font names is needed for fontList.

    >
    > Great. I once experienced another problem with the ja_JP.eucJP localization -
    > FileSelectionBox dialogs didn't allow files to be selected, and adding the
    > colon at the end of the fonList value solved it, which I didn't quite
    > understand. Why does the ":" char matters if no tag follows it?


    The fontList with "*" and without ":" is assumed as a font name
    with wild cards, and the first matched font will be loaded.
    The ":" is a switch character which the fontList is a font or a
    fontset.
    ---------------------------------------------------------------------
    tesigana@mtf.biglobe.ne.jp

  6. Re: Japanese Internationalization on Red Hat Linux 9

    doc_holliday1_2000@yahoo.com (Ben) writes:

    > Adding the ":" at the end of the specified font worked wonders in
    > terms of rendering the Japanese characters. Thanks Tesigana!


    Congratulations :-)

    > I am still having some problems with Japanese input. I have set the
    > LANG and XMODIFIERS as suggested and now many of my GUIs are now
    > capable of Japanese input. However some of them still do not respond
    > to the shift+space. I noticed those editable text boxes can now
    > display Japanese characters and I can even paste Japanese characters
    > in them but typing Japanese characters directly into them is not
    > possible.


    man kinput2 says:

    When using X Input Method Protocol, you have to specify
    the name of the input server you want to use. This can be
    done by setting ``inputMethod'' resource or setting XMODI-
    FIERS environment variable. Since some clients don't
    regard inputMethod resource while other clients ignore
    XMODIFIERS variable, so it is a good idea to set both of
    them.

    To use kinput2, you should add the following line to your
    resource file (such as .Xresources or .Xdefaults):
    *inputMethod: kinput2
    and, set XMODIFIERS to ``@im=kinput2''.
    setenv XMODIFIERS "@im=kinput2" (for csh)
    XMODIFIERS="@im=kinput2"; export XMODIFIERS (for sh)

    How about setting the resource "*inputMethod" ?

    > Also some of my GUIs now have an extra box running horizontally along
    > the bottom of the them.


    The extra box is called "status area", and it displays input method
    or input server status. You can remove this by VendorShell's resource
    XmNpreeditType, "*preeditType: OnTheSpot", but this may not work well.
    ---------------------------------------------------------------------
    tesigana@mtf.biglobe.ne.jp

  7. Re: Japanese Internationalization on Red Hat Linux 9

    tesigana@mtf.biglobe.ne.jp (tesigana@mtf.biglobe.ne.jp) wrote in message news:...
    > Evgeny Stambulchik writes:
    >
    > >> *fontList: -*-fixed-medium-r-normal--16-*-*-*-*-*-*-*:
    > >> (or *fontList: a14;k14;r14
    > >> Note that the last charcter ":" of font names is needed for fontList.

    > >
    > > Great. I once experienced another problem with the ja_JP.eucJP localization -
    > > FileSelectionBox dialogs didn't allow files to be selected, and adding the
    > > colon at the end of the fonList value solved it, which I didn't quite
    > > understand. Why does the ":" char matters if no tag follows it?

    >
    > The fontList with "*" and without ":" is assumed as a font name
    > with wild cards, and the first matched font will be loaded.
    > The ":" is a switch character which the fontList is a font or a
    > fontset.
    > ---------------------------------------------------------------------
    > tesigana@mtf.biglobe.ne.jp



    Thanks again Tesigana!
    The *inputMethod resource was what I was missing.
    Also thanks for the explanation on the necessity of the ":". I was
    wondering about that myself.

  8. Re: Japanese Internationalization on Red Hat Linux 9

    tesigana@mtf.biglobe.ne.jp wrote:
    > Evgeny Stambulchik writes:
    >
    >
    >>> *fontList: -*-fixed-medium-r-normal--16-*-*-*-*-*-*-*:
    >>> (or *fontList: a14;k14;r14
    >>> Note that the last charcter ":" of font names is needed for fontList.

    >>
    >>Great. I once experienced another problem with the ja_JP.eucJP localization -
    >>FileSelectionBox dialogs didn't allow files to be selected, and adding the
    >>colon at the end of the fonList value solved it, which I didn't quite
    >>understand. Why does the ":" char matters if no tag follows it?

    >
    >
    > The fontList with "*" and without ":" is assumed as a font name
    > with wild cards, and the first matched font will be loaded.
    > The ":" is a switch character which the fontList is a font or a
    > fontset.


    Thanks. Is there a drawback of always appending ":"?

    Regards,

    Evgeny


  9. Re: Japanese Internationalization on Red Hat Linux 9

    Evgeny Stambulchik writes:

    > Thanks. Is there a drawback of always appending ":"?


    Yes. I sometimes forget ":", and it makes me confuse ;-)
    ---------------------------------------------------------------------
    tesigana@mtf.biglobe.ne.jp

  10. Re: Japanese Internationalization on Red Hat Linux 9

    tesigana@mtf.biglobe.ne.jp wrote:
    > Evgeny Stambulchik writes:
    >
    >
    >>Thanks. Is there a drawback of always appending ":"?

    >
    >
    > Yes. I sometimes forget ":", and it makes me confuse ;-)


    Seriously. Like performance issues WRT fontsets vs. fonts?

    Also, there is a run-time warning:

    Warning: Missing charsets in String to FontSet conversion

    It seems harmless, but what's the reason? A few last entries from the trace:

    #0 0x402f52f4 in XtWarning () from /usr/X11R6/lib/libXt.so.6
    #1 0x402f4e3b in XtAppGetErrorDatabaseText () from /usr/X11R6/lib/libXt.so.6
    #2 0x402f4ec8 in _XtDefaultWarningMsg () from /usr/X11R6/lib/libXt.so.6
    #3 0x401c025c in MotifWarningHandler () from /usr/X11R6/lib/libXm.so.3
    #4 0x402f5031 in XtAppWarningMsg () from /usr/X11R6/lib/libXt.so.6
    #5 0x402ef070 in XtCvtStringToFontSet () from /usr/X11R6/lib/libXt.so.6
    #6 0x402ece96 in XtDirectConvert () from /usr/X11R6/lib/libXt.so.6
    #7 0x402ed041 in XtCallConverter () from /usr/X11R6/lib/libXt.so.6
    #8 0x401d6450 in ValidateAndLoadFont () from /usr/X11R6/lib/libXm.so.3
    #9 0x401d6742 in _XmRenditionCreate () from /usr/X11R6/lib/libXm.so.3
    #10 0x401cd1ed in XmFontListEntryLoad () from /usr/X11R6/lib/libXm.so.3
    #11 0x4013b9d0 in CvtStringToXmFontList () from /usr/X11R6/lib/libXm.so.3
    #12 0x402ece96 in XtDirectConvert () from /usr/X11R6/lib/libXt.so.6
    #13 0x402ed16c in _XtConvert () from /usr/X11R6/lib/libXt.so.6
    #14 0x40305db8 in _XtCreateIndirectionTable () from /usr/X11R6/lib/libXt.so.6
    #15 0x40306477 in _XtGetResources () from /usr/X11R6/lib/libXt.so.6
    #16 0x402f1d54 in XtInitializeWidgetClass () from /usr/X11R6/lib/libXt.so.6
    #17 0x402f2329 in _XtCreateWidget () from /usr/X11R6/lib/libXt.so.6
    #18 0x402f23ad in XtCreateWidget () from /usr/X11R6/lib/libXt.so.6

    BTW, some googling reveals a couple of interesting advices. E.g.
    http://www.artwork.com/gdsii/qckvu/faq/linux_font.htm

    Regards,

    Evgeny


+ Reply to Thread