Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
java input locale
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Mon Jul 14, 2003 11:29 am    Post subject: java input locale Reply with quote

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
View user's profile Send private message
kaa17
n00b
n00b


Joined: 15 Sep 2003
Posts: 6
Location: Russia, Korolev

PostPosted: Mon Sep 15, 2003 6:45 am    Post subject: java input locale Reply with quote

I have the same problem!
Back to top
View user's profile Send private message
Miggi
n00b
n00b


Joined: 20 Feb 2003
Posts: 24
Location: Switzerland

PostPosted: Mon Sep 15, 2003 11:55 am    Post subject: Reply with quote

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
View user's profile Send private message
kaa17
n00b
n00b


Joined: 15 Sep 2003
Posts: 6
Location: Russia, Korolev

PostPosted: Tue Sep 16, 2003 7:22 am    Post subject: Reply with quote

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 :oops: .
Back to top
View user's profile Send private message
kaa17
n00b
n00b


Joined: 15 Sep 2003
Posts: 6
Location: Russia, Korolev

PostPosted: Fri Sep 19, 2003 12:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum