Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Java Swing-GUI with international chars
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
paddlaren
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2005
Posts: 125
Location: Hörby, Sweden

PostPosted: Sun Nov 05, 2006 10:45 am    Post subject: [Solved] Java Swing-GUI with international chars Reply with quote

Hi!

I'm currently working on a small project in Java with a Swing interface and it seems impossible to use the Swedish characters in the GUI. I cannot set labels in Swedish, I cannot do input in Swedish. This is a real pain for me.

I'm pretty sure that Java is able to deal with international characters and UTF-8.

For the moment I use Netbeans 5.5 as environment, though I have had this problem since NetBeans 3.something.

I have tried to open the file in kate and changed character encoding in the source file to utf-8 and iso-8859-1 with the result that the compiler warn me for converting the Swedish character to ASCII. Why the conversion to ASCII?
In some old java SDK i could tell the compiler, or was it the runtime, to use ISO-8859-1 enconding to get this stuff work.


Oh, by the way. I slightly remember this to be a nonproblem in MS Windows and thereby guessing the relation to settings in the operating system.

Anyone have any idea to solve this, or environment where this is not a problem?

// Erik


Last edited by paddlaren on Sun Nov 05, 2006 7:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
paddlaren
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2005
Posts: 125
Location: Hörby, Sweden

PostPosted: Sun Nov 05, 2006 7:09 pm    Post subject: Reply with quote

I tried this on a Kubuntu 6.10 system and Swedish ÖÄÅ seems to work nice. I notice that the encodeing seems to be UTF-8 as default on the Kubunut and I know from bitter experience that it is not that same in Kubuntu and Gentoo.

Will switch over to UTF-8 in Gentoo as a start.
Back to top
View user's profile Send private message
paddlaren
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2005
Posts: 125
Location: Hörby, Sweden

PostPosted: Sun Nov 05, 2006 7:41 pm    Post subject: Reply with quote

This is amazing! :D
I followed the Using UTF-8 with Gentoo and it worked. It wasn't even hard to do and took less than an hour (compared to the hours I spent on this subject.....) A several years long keeping away from java is over!

:!: The answer seems to be: to use international characters in Swing you must have an UTF-8 compliant desktop/system.

Hope this can be useful to others in the same need. We are quite some non-English-speaking using computers over the globe :lol:

// Erik
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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