From owner-freebsd-java Sat Nov 17 0: 8:16 2001 Delivered-To: freebsd-java@freebsd.org Received: from novakom.dp.ua (novakom.dp.ua [195.24.147.52]) by hub.freebsd.org (Postfix) with SMTP id 53F9C37B405 for ; Sat, 17 Nov 2001 00:08:09 -0800 (PST) Received: (qmail 7949 invoked from network); 17 Nov 2001 07:34:59 -0000 Received: from unknown (HELO there) (10.1.0.1) by post.novakom.dp.ua with SMTP; 17 Nov 2001 07:34:59 -0000 Content-Type: text/plain; charset="koi8-r" From: Valery V.Chikalov To: freebsd-java@freebsd.org Subject: Success story Date: Sat, 17 Nov 2001 09:41:24 +0200 X-Mailer: KMail [version 1.3] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011117080809.53F9C37B405@hub.freebsd.org> 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 FreeBSD + GUI Java application are backbone of my production environment. Some times ago I have upgraded my working configuration to FreeBSD 4.4-RELEASE, XFree86-4.1.0_6, linux-base 6.1, java version "1.4.0-beta2" (I'm citizen of Ukraine (xSSR) and due to USA export restriction can't use native version of Java) and found that I can't input russian text in java Swing application. I have checked my language setting MM_CHARSET=KOI8-R LANG=ru_RU.KOI8-R LC_ALL=ru_RU.KOI8-R relevant XFree86 setting Option "XkbLayout" "ru" Option "XkbOptions" "grp:ctrl_shift_toggle" I'm using KDE-2.2 as WM but have found that it has no effect on problem (Preferences->Periferals->Keyboard->Disable_keyboard_Layouts = true) this console java program which I run under X-environment also have worked as needed import java.util.*; import java.io.*; public class I18NSample { static public void main(String[] args) throws Exception { InputStreamReader defaultReader = new InputStreamReader(System.in); System.out.println("User language: " + System.getProperty("user.language")); System.out.println("System encoding: " + System.getProperty("file.encoding")); System.out.println("Reader encoding: " + defaultReader.getEncoding()); System.out.println("Default locale: " + Locale.getDefault()); BufferedReader dis = new BufferedReader(defaultReader); System.out.println("Was readed: " + dis.readLine()); } } >java I18NSample User language: ru System encoding: KOI8-R Reader encoding: KOI8_R Default locale: ru_RU Привет мир! Привет мир! Tweaking /usr/X11R6/lib/X11/locale/koi8-r/XLC_LOCALE ($XFree86: xc/nls/XLC_LOCALE/koi8-r,v 3.4 2001/01/17 19:37:05 dawes Exp $i) (on my lucky I have FreeBSD 4.0-RELEASE , linux-base 6.1, XFree86-4.0, java version "1.3.0" without problem of russian input ) I found that comenting out this lines #XLC_CHARSET_DEFINE #csd0 { # charset_name KOI8-R # side GR # length 1 # string_encoding False # sequence \x1b%/1 #} #END XLC_CHARSET_DEFINE solves the problem. Maybe somebody can explain me reason of this (which is guilty - Java, XFree86, Linuxulator ?). Or I hope the my experience help somebody to reduce debugging time becose I spend long time digging in different mail archives and Internet resources. Valery. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message