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
  •  


IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES picture

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES

$108.92



Ibm Computer Tower picture

Ibm Computer Tower

$400.00



Lot of 2 IBM blade center Type H chassis 8852 picture

Lot of 2 IBM blade center Type H chassis 8852

$559.00



IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU picture

IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU

$200.00



IBM 4262 SYSTEM x3200 Tower - HDD Wiped, NO OS picture

IBM 4262 SYSTEM x3200 Tower - HDD Wiped, NO OS

$80.00



IBM iDataPlex dx360 M4 with 4× Xeon E5-2680 v2, 128 GB RAM, 2× QLogic picture

IBM iDataPlex dx360 M4 with 4× Xeon E5-2680 v2, 128 GB RAM, 2× QLogic

$149.00



IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU picture

IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU

$999.99



IBM Power 710 Express 8231-E2B POWER7 16GB DDR3 RAM 2U Rack Server No HDD. picture

IBM Power 710 Express 8231-E2B POWER7 16GB DDR3 RAM 2U Rack Server No HDD.

$409.99



IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM

$149.99



Unused IBM 09P0037 MAINBOARD For  RS/6000 7044-170 P-Series picture

Unused IBM 09P0037 MAINBOARD For RS/6000 7044-170 P-Series

$281.25