On 17/10/15 08:35, Bryan Linton wrote:
On 2017-10-15 09:38:56, Niels Kobschaetzki <ni...@kobschaetzki.net> wrote:
On 17/10/15 07:12, Niels Kobschaetzki wrote:
> On 17/10/15 06:41, Niels Kobschaetzki wrote:
> > Hi,
> >
> > I am trying to get Japanese input working in xterm but I just cannot get
> > it to work. It works in xfce4-terminal though.
> >
> > I have in my .profile and my .xsession:
> > export LANG=en_US.UTF-8
> > export LC_NUMERIC=de_DE.UTF-8
> > export LC_TIME=de_DE.UTF-8
> > export LC_MONETARY=de_DE.UTF-8
> > export LC_PAPER=de_DE.UTF-8
> > export LC_NAME=de_DE.UTF-8
> > export LC_ADDRESS=de_DE.UTF-8
> > export LC_TELEPHONE=de_DE.UTF-8
> > export LC_MEASUREMENT=de_DE.UTF-8
> > export LC_IDENTIFICATION=de_DE.UTF-8
> > export LC_CTYPE=en_US.UTF-8
> >
> > export GTK_IM_MODULE=ibus
> > export XMODIFIERS="@im=ibus" xterm
> > export QT_IM_MODULE=ibus
> >
> > I am not sure though what exactly is necessary now because I tried now a
> > lot to get it working.
> >
> > In my .Xdefaults I have:
> > XTerm*faceName: Terminess Powerline:style=Medium
> > XTerm*faceSize: 13
> > xterm*faceNameDoublesize: Sazanami Mincho
> > XTerm*utf8: true
> > XTerm*locale: utf8
> > XTerm*inputMethod: ibus
> >
> > When I have ibus-anthy activated the pop over appears and I can type
> > Japanese but when I hit enter to place it, no characters appear. When I
> > want to open a japanese web page like https://www.asahi.com in lynx
> > there are only garbled characters (and w3m crashes).
> >
> > A mail in Japanese appears correctly in mutt though.
> >
> > What I am missing?
>
> I got a bit further. When I start xterm with "xterm -cjk_width" it works
> \o/
>
> But setting "XTerm*cjkWidth: true" in .Xdefaults has no effect (yes, I
> do a xrdb -merge .Xdefaults)

And now I found yet another issue. The moment I use
xterm*faceNameDoublesize the character "ü" breaks and the line-drawing
characters on the bottom of the index of mutt break as well


I have mostly the same settings as you do in .xinitrc, except I
use UIM instead of ibus.  Everything works well for me.

What do you mean when you say, "when I hit enter to place it, no
characters appear"?  Does nothing happen at all?  Or do you see
dotted rectangles instead of kanji?

nothing appears at all.

I use two different commands to launch xterms depending on whether
I want to use Japanese or not.  In the normal xterm, I can input
text and create documents, but I see dotted rectangles because I
use the default font.  If I view that file with the proper fonts
after creating it, it's fine, so I know the input is being
properly sent and recorded.

I have a jxterm.sh command contaning the following command:
        env LC_ALL=ja_JP.UTF-8 xterm -fa "Sazanami Gothic" -fs 16 $1
that I run whenever I want to explicitly use (and see) Japanese.

When I start xterm with these settings, everything works as expected.
Even the "ü" ;)
Thanks :)

I just tried it without setting the environment, and even then it works.
And when I set XTerm*faceName: Sazanami Mincho:style=Regular it also
works.

The problem seems to be that XTerm*faceNameDoublesize isn't used for
some reason.

I do this because I prefer the default font in xterms for Latin
text, and the Japanese font is too big for my tastes.  For
Japanese it's the other way around.  A bigger font is necessary to
show the detail of kanji.  Either way, it's only a display issue
and I can edit documents even if the font doesn't display them
properly.

I hoped, I can find a way to use both at once - Terminess for ascii, a
Japanese font for Japanese.

Does this work if you try using UIM?  What about SCIM?

I tried so far only ibus. I think it is purely a display, not an
IM-method-problem. As written above. When I start it with the settings
from you, it works.

UIM seems to be moribund.  There have been some recent commits,
but the last release was in 2015.  The current release does not
work with QT5.  I brought this up on ports@, since recent commits
have enabled QT5 support, and it was suggested that I contact
upstream and ask them to make a proper release.

I am used to use ibus for quite some time now. I prefer fcitx (instead
of ibus) with mozc (instead of anthy) but I found that I can get them
only properly to work in Arch Linux.

Niels

Reply via email to