View previous topic :: View next topic |
Author |
Message |
kos n00b
Joined: 28 May 2003 Posts: 71 Location: Mountain View, CA
|
Posted: Mon Jul 14, 2003 11:29 am Post subject: java input locale |
|
|
Hi,
I'm having problems typing cyrillic characters in swing apps. Tried various precompiled java versions and 1.4.1-gentoo, but I'm always getting either squares or something looking like Arabic characters
My locale is set to ru_RU.KOI8-R. Tried to use en_US.UTF-8, but it didn't help.
Any help will be appreciated.. _________________ /KoS |
|
Back to top |
|
|
kaa17 n00b
Joined: 15 Sep 2003 Posts: 6 Location: Russia, Korolev
|
Posted: Mon Sep 15, 2003 6:45 am Post subject: java input locale |
|
|
I have the same problem! |
|
Back to top |
|
|
Miggi n00b
Joined: 20 Feb 2003 Posts: 24 Location: Switzerland
|
Posted: Mon Sep 15, 2003 11:55 am Post subject: |
|
|
you can set the java default encoding by calling java with the following parameter:
Code: |
java -Dfile.encoding=YOUR_ENCODING
|
you also can set the enviroment variable JAVA_OPTS to that parameter.
You can also set the encoding of you .java files by calling javac with
Code: |
javac -encoding YOUR_ENCODING
|
Note that the javac parameter has no =, the java one has... |
|
Back to top |
|
|
kaa17 n00b
Joined: 15 Sep 2003 Posts: 6 Location: Russia, Korolev
|
Posted: Tue Sep 16, 2003 7:22 am Post subject: |
|
|
Thank you for help, but this problem is only when i try to _type_ russian characters in _swing_ text fields.
In text mode it's all ok. Also swing labels, menu, buttons and etc. appears
in Russian properly. Maybe it is X problem?
PS: And excuse me for my English . |
|
Back to top |
|
|
kaa17 n00b
Joined: 15 Sep 2003 Posts: 6 Location: Russia, Korolev
|
Posted: Fri Sep 19, 2003 12:37 pm Post subject: |
|
|
Yes, i found!!! It's really X problem! In directory /usr/X11R6/lib/X11/locale/koi8-r must be present file 'Compose':
Code: | #
# koi8-r Compose Sequence
#
# Sequence Definition
#
# $XFree86: xc/nls/Compose/koi8-r,v 1.2 2001/04/26 21:09:40 dawes Exp $
#
# This file currently has no entries. It appears that a compose file (even
# just an empty one) is required for the appropriate keysyms to work for
# this encoding.
#
# <Multi_key> Means <Compose>
# Special Character
# End of Sequence Definition | .
You can copy it from cp866 or cp1251 directory. Now all works finely.
Sorry for my English again. Can anybody, who knows English well, submit a bugreport to bugzilla? Thank you. |
|
Back to top |
|
|
|