From owner-freebsd-java Sun Aug 26 6:37:18 2001 Delivered-To: freebsd-java@freebsd.org Received: from matsulab.is.titech.ac.jp (matsulab.is.titech.ac.jp [131.112.35.129]) by hub.freebsd.org (Postfix) with ESMTP id 0E86A37B406 for ; Sun, 26 Aug 2001 06:37:15 -0700 (PDT) (envelope-from fuyuhik8@is.titech.ac.jp) Received: from tripper.private by matsulab.is.titech.ac.jp (8.8.8+Sun/3.7W) id WAA07030; Sun, 26 Aug 2001 22:37:08 +0900 (JST) Date: Sun, 26 Aug 2001 22:39:33 +0900 Message-ID: <55g0af0wkq.wl@tripper.private> From: Fuyuhiko Maruyama To: Mikhail Kruk Cc: java@FreeBSD.ORG Subject: Re: jdk1.3.1 awt exception, plugin, OpenJIT In-Reply-To: References: <20010825130721.A20869@misty.eyesbeyond.com> User-Agent: Wanderlust/2.6.0 (Twist And Shout) on XEmacs/21.5.1 (anise) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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 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