-
International characters not displayed
I am working on a Java project (in NetBeans 5.5) under Linux (Fedora). When I enter some text into a JTextPane, the characters are displayed correctly -- including international chartacters like 'æ', 'ø', and 'å'.
The program is to be run on Knoppix, with the configurations (and home dir) stored on an USB disk. First off, in the terminal prompt, I am able to type accented characters, so it seems the System is configured correctly (under Keyboard, or whatever...). Also, the Java program writing to the pane works fine:
Code:
msgField.setText("æøå test"); // this is displayed correctly
However, when I type from the keyboard into the Java program, all accented characters (including ä, ö, ñ, é, etc) are displayed as boxes. And if I echo the contents of the pane to terminal, I simply get question marks:
Code:
System.out.println(msgField.getText()); // this is displayed as "??? test"
(Allso the correctly displayed characters (via setText, as above) are echoed as question marks...)
Does anyone have any tips on how to fix this? I have tried installing MSTT core fonts (from Windows) on the Knoppix USB disk... Any help greatly appreciated!
Also, I have looked through the Forum, found a few related topics, but no solutions that worked for me. I tried editing the /etc/sysconfig/i18n file and exporting the $LANG variable, too. Btw, here's my i18n file:
LANG="no_NO@euro"
COUNTRY="no"
LANGUAGE="no"
CHARSET="iso8859-1"
XMODIFIERS=""
and the command env outputs (among lots of other stuff) this:
SHELL=/bin/bash
TERM=xterm
LC_ALL=no_NO@euro
JAVA_HOME=/home/knoppix/bin/jdk1.5.0_09
LANGUAGE=no
BASH_ENV=/home/knoppix/.bashrc
JDKHOME=/home/knoppix/bin/jdk1.5.0_09
- Joakim
Norway
-
I have had problems with this as well. Not sure if this is going to help you, but here some things:
I don't think the CHARSET="iso8859-1" from your sysconfig/i18n (this will be replicated in sysconfig/knoppix, which I believe is more important for Knoppix) file has the characters you are looking for. However, I am not exactly sure which parts of Knoppix depend on this setting. I have fixed this by changing the theme (which also includes different fonts) in the Controll Center: K Menu -> Controll Center -> Appearance & Themes -> Fonts.
I eventually booted Knoppix with every cheatcode that has some localization: lang, tz, keyboard, xkeyboard, and I still had to manually edit KDEKEYBOARDS in sysconfig/keyboard and sysconfig/knoppix. Note that if you use myconfig, then it will overwrite all these cheatcodes - I have a hack to get around this, if you're interested. After all this, my system seems to be working fine.
-
Somehow, this worked out...
echo LANG gives ISO-8859-1 and my i18n file contains:
Code:
LANG="en_US.UTF-8"
COUNTRY="no"
LANGUAGE="no"
CHARSET="en_US.UTF-8"
XMODIFIERS=""
(note that "no" is abbrev. for Norway)
I rebooted Knoppix using Ctrl-Alt-Backspace. Hope I'm able to redo this on the other PC's I need to handle accents...
-J
-
joakimk, I'm a little confused. How exactly did you solve it? By changing the theme or editing the i18n file or something else? Thanks for your help.
-

Originally Posted by
joakimk
Somehow, this worked out...
echo LANG gives ISO-8859-1 and my i18n file contains:
Code:
LANG="en_US.UTF-8"
COUNTRY="no"
LANGUAGE="no"
CHARSET="en_US.UTF-8"
XMODIFIERS=""
(note that "no" is abbrev. for Norway)
I rebooted Knoppix using Ctrl-Alt-Backspace. Hope I'm able to redo this on the other PC's I need to handle accents...
All this does not seem right. My sysconfig/i18n looks like this:
Code:
LANG="en_IE@euro"
COUNTRY="ie"
LANGUAGE="ie"
CHARSET="iso8859-15"
XMODIFIERS=""
All this would seem to suggest that only Knoppix-specific stuff depends on these files. For example, /usr/sbin/saveconfig (which is the Knoppix utility to save the user's configuration) starts with sourcing sysconfig/knoppix (which also contains all the information from sysconfig/i18n) and then makes some decisions based on the LANGUAGE setting.
I suspect your problem/solution lies elsewhere, but I have no idea where... Sorry.
-
Senior Member
registered user
[quote="SiKing"]

Originally Posted by
joakimk
Somehow, this worked out...
echo LANG gives ISO-8859-1 and my i18n file contains:
Code:
LANG="en_US.UTF-8"
COUNTRY="no"
LANGUAGE="no"
CHARSET="en_US.UTF-8"
XMODIFIERS=""
(note that "no" is abbrev. for Norway)
I suspect your problem/solution lies elsewhere, but I have no idea where... Sorry.

Well, I ran into the same problem (also from Norway), and joakimk's solution works just fine for me, too. Do we need to go any further with this, then?
Similar Threads
-
By andrew1 in forum MS Windows & New to Linux
Replies: 6
Last Post: 12-02-2006, 03:24 AM
-
By stmue in forum General Support
Replies: 0
Last Post: 04-11-2005, 11:46 AM
-
By zebul666 in forum General Support
Replies: 0
Last Post: 02-28-2004, 06:01 PM
-
By markleong in forum General Support
Replies: 5
Last Post: 12-27-2003, 02:25 AM
-
By ramu_i in forum General Support
Replies: 1
Last Post: 07-18-2003, 04:33 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

INTEL XEON E5-2680V4 SR2N7 2.40GHZ CPU
$11.00

Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS
$239.99

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD
$275.00

Lenovo ThinkStation P520c Intel Xeon W-2133 6-Core 3.60GHz -NO RAM/ HDD/ GPU/ OS
$127.54

Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS
$179.98

Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS
$84.49

Dell Precision T7820 2x Xeon Silver 4114 2.20GHz 950W No RAM GPU HDD 4x SATA
$350.48

Intel Xeon E5-2690 v4 SR2N2 14 Core 2.6GHz 35MB LGA2011-3 CPU *km
$15.99

Intel Xeon Phi 5110P 60-Core 1.053GHz Coprocessor
$50.00

HP Z420 Tower Workstation Xeon E5-1620 3.60GHz, 4GB Ram, NO HDD, NO OS
$140.00