From owner-freebsd-java Wed Apr 26 20: 5:23 2000 Delivered-To: freebsd-java@freebsd.org Received: from tohokugw.tohoku.iij.ad.jp (tohokugw.tohoku.iij.ad.jp [202.232.14.98]) by hub.freebsd.org (Postfix) with ESMTP id 80F2C37BD6A for ; Wed, 26 Apr 2000 20:05:16 -0700 (PDT) (envelope-from taguchi@tohoku.iij.ad.jp) Received: by tohokugw.tohoku.iij.ad.jp; id MAA08303; Thu, 27 Apr 2000 12:05:15 +0900 (JST) From: Received: from hirose.tohoku.iij.ad.jp(192.168.144.2) by tohokugw.tohoku.iij.ad.jp via smap (V4.2) id xma008299; Thu, 27 Apr 00 12:05:09 +0900 Received: from hirose.tohoku.iij.ad.jp (localhost [127.0.0.1]) by hirose.tohoku.iij.ad.jp (8.9.3/3.7W99113014) with ESMTP id MAA41804; Thu, 27 Apr 2000 12:05:16 +0900 (JST) Date: Thu, 27 Apr 2000 12:05:15 +0900 Message-ID: To: glewis@trc.adelaide.edu.au Cc: taguchi@tohoku.iij.ad.jp, freebsd-java@FreeBSD.ORG Subject: Re: Pre-alpha JDK 1.2.2 TimeZone (time) bug fixed! In-Reply-To: In your message of "Thu, 27 Apr 2000 10:58:37 +0930 (CST)" <200004270128.KAA48402@ares.trc.adelaide.edu.au> References: <200004270128.KAA48402@ares.trc.adelaide.edu.au> User-Agent: Wanderlust/2.2.12 (Joyride) EMIKO/1.13.9 (Euglena tripteris) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i386--freebsd) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by EMIKO 1.13.9 - "Euglena tripteris") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > This should IMO, DTRT. I see there is also a call to setlocale() in > awt_MToolkit.c which links into libawt.so, but this one sets the locale > to the default "C" locale which should be ok based on your explanation. > Comments? I think following code is seemed correct. if (!XSupportsLocale()) { <--- This means system does not support user's locale. if jdk use libc's setlocale, and user's locale is japanese or korea, then XSupportLocale() will return FALSE. jio_fprintf(stderr, "current locale is not supported in X11, locale is set to C"); setlocale(LC_ALL, "C"); } By other hand, In normal Xt-based (include Motif/lesstif) programs, when create application context, it must call XtSetLanguageProc(), such as: void main () { ... XtSetLanguageProc(NULL, NULL, NULL); toplevel = XtAppInitialize (&app_con, ..... ); ... } But awt_MToolkit.c call XtToolkitInitialize() only. I think it may be incorrect. Sorry, I can not say certainly. I was a X programmer LOG TIME AGO, so I forget many many things. > > PS: My modification is not tested yet. Because I'm using FreeBSD-4.0-stable. > > Compilation was OK. But I can not test locale related features. > > Right. Time to get the next patchset out so you can :). I'm waiting! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message