Date: Sat, 17 Nov 2001 09:41:24 +0200 From: Valery V.Chikalov <valera@novakom.dp.ua> To: freebsd-java@freebsd.org Subject: Success story Message-ID: <20011117080809.53F9C37B405@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011117080809.53F9C37B405>