Date: Sun, 26 Aug 2001 22:39:33 +0900 From: Fuyuhiko Maruyama <fuyuhik8@is.titech.ac.jp> To: Mikhail Kruk <meshko@cs.brandeis.edu> Cc: java@FreeBSD.ORG Subject: Re: jdk1.3.1 awt exception, plugin, OpenJIT Message-ID: <55g0af0wkq.wl@tripper.private> In-Reply-To: <Pine.LNX.4.33.0108250000350.9810-100000@daedalus.cs.brandeis.edu> References: <20010825130721.A20869@misty.eyesbeyond.com> <Pine.LNX.4.33.0108250000350.9810-100000@daedalus.cs.brandeis.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Mikhail,
I have seen the J2SDK code, and now I believe your problem isn't
really a problem of J2SDK but of X11's ru_RU.KOI8-R supports.
At Sat, 25 Aug 2001 00:04:25 -0400 (EDT),
Mikhail Kruk wrote:
>
> > > I've tried to use src/solaris/classes/sun/awt/motif/font.properties.linux
> > > instead of the one that was installed in the budil/bsd-i386 and all the
> > > font startup error messages went away. However the XIM exception is still
> > > there and I'm pretty sure now that it's not font-related.
> >
> > Funny, I thought I just copied the Linux version. Maybe I copied the
> > 1.2.2 BSD font.properties file, not sure.
>
> Most likely you used
> ./j2sdk1.3.1/src/solaris/classes/sun/awt/motif/font.properties.bsd
>
> However the X installation on thix box is 2 years old I've done a lot of
> things to it... horrible things... so I'm not sure if it can surve as a
> reference.
>
> > There is a known problem using XIM in some circumstances. Do you have
> > any non-english language enabled? There is a known problem with the
> > patches and XIM and Japanese.
>
> Exactly. unsetenv LANG did it. (I had ru_RU.KOI8-R) Sorry about that: now
> I remember this discussion on the list.
If you are interested in the fact, please see the source code.
at j2sdk1.3.1/src/solaris/native/sun/awt/awt_MToolkit.c:1515
if (!XSupportsLocale()) {
jio_fprintf(stderr,
"current locale is not supported in X11, locale is set to C"
);
setlocale(LC_ALL, "C");
}
The XSupportsLocale() call must return False if Xlib locale-dependent
functions are not capable for current locale. Your case,
ru_RU.KOI8-R, may be the case False to be returned, but it doesn't
return False. Therefore, awt skips to setlocale(LC_ALL, "C") and as
the result, XOpenIM(...) -- a Xlib locale-dependent function returns
NULL at j2sdk1.3.1/src/solaris/native/sun/awt/awt_InputMethod.c:1071.
It means that XOpenIM failed. For locales that Xlib locale-dependent
functions are capable, XOpenIM fails only when current locale needs
XIM server to input text in the language specified by current locale
*AND* the XIM server isn't available. This is the case can be happen
in Chinese/Japanese/Korean environment. For English or some other
language using latin characters environment that are well supported in
X11 may never fail.
I'm not sure about Russian environment. Does setting LANG=C for java
cause any problems for you?
--
Fuyuhiko MARUYAMA <fuyuhik8@is.titech.ac.jp>
Matsuoka laboratory,
Department of Mathematical and Computing Sciences,
Graduate School of Information Science and Engineering,
Tokyo Institute of Technology.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55g0af0wkq.wl>
