Results 1 to 6 of 6

Thread: International characters not displayed

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    3

    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

  2. #2
    Member registered user
    Join Date
    Apr 2005
    Location
    California
    Posts
    92
    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.

  3. #3
    Junior Member
    Join Date
    Jun 2007
    Posts
    3
    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

  4. #4
    Junior Member
    Join Date
    Jan 2007
    Posts
    9
    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.

  5. #5
    Member registered user
    Join Date
    Apr 2005
    Location
    California
    Posts
    92
    Quote 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.

  6. #6
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    [quote="SiKing"]
    Quote 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

  1. Mapping keys on keyboard to corresponding characters on scr
    By andrew1 in forum MS Windows & New to Linux
    Replies: 6
    Last Post: 12-02-2006, 03:24 AM
  2. Replies: 0
    Last Post: 04-11-2005, 11:46 AM
  3. no background image displayed at boot
    By zebul666 in forum General Support
    Replies: 0
    Last Post: 02-28-2004, 06:01 PM
  4. Entering Chinese characters
    By markleong in forum General Support
    Replies: 5
    Last Post: 12-27-2003, 02:25 AM
  5. Keyboard Characters Not Mapping Correctly
    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
  •  


KNOPPIX 9.1 Linux Install & Live DVD 32bit & 64bit picture

KNOPPIX 9.1 Linux Install & Live DVD 32bit & 64bit

$19.99



Windows XP, Vista, 8.1, Linux Knoppix, Office XP,  (6 CDS) picture

Windows XP, Vista, 8.1, Linux Knoppix, Office XP, (6 CDS)

$12.00



KNOPPIX USB DVD OS , BEST OF ALL HIGHLY RECOMENDED picture

KNOPPIX USB DVD OS , BEST OF ALL HIGHLY RECOMENDED

$11.99



Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive picture

Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive

$5.99



Knoppix NSM 1.2 picture

Knoppix NSM 1.2

$8.00



VINTAGE SOFTWARE | KNOPPIX STD 0.1 (SECURITY TOOLS DISTRIBUTION) picture

VINTAGE SOFTWARE | KNOPPIX STD 0.1 (SECURITY TOOLS DISTRIBUTION)

$7.97



Hamshack Live DVD-ROM picture

Hamshack Live DVD-ROM

$7.00



Vintage Linux DVD - Knoppix 5.2 - c't Magazine - 7 / 2007 - Software Collection 2 picture

Vintage Linux DVD - Knoppix 5.2 - c't Magazine - 7 / 2007 - Software Collection 2

$8.04



Knoppix 5.0.1 ULTRA RARE Linux DVD - Linux Pro Extra August 2006 picture

Knoppix 5.0.1 ULTRA RARE Linux DVD - Linux Pro Extra August 2006

$34.45