Toon posts:

[Java] Letter met accenten gebruiken onder Linux

Pagina: 1
Acties:
  • 70 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik heb dit deze morgen gepost op forums.gentoo.org, maar er is nog niemand die er een antwoord op weet. Misschien heb ik hier mee geluk. Het bericht is echter wel in het engels...

Hello,

I've some trouble using accentuated characters in the console and Java applications. My keyboard is set to be-latin1, the timezone to Brussels. I didn't set any other variable on my system.

When I type characters like ç è é à ü § ^ etc, they don't appear in xterm.
In the non graphical console they're replaced by greek characters or other things you could use for maken an ASCII rectangle in old programs or scripts.

When typing them into my Java applications, they're replaced by a square.
That square is seen as a question mark when doing a System.out.println();

When compiling I also get this:
code:
1
Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct


I set the file codepage in Eclipse 3.0.1 to ISO-8859-1 instead of ANSI_X3.4-1968, which I think is for the United States.

When doing export LANG=be or export LANG="fr_FR" in xterm it doesn't solve anything.
With es_ES, I can see the accentuated characters in the Java ui, bit not in the printlns. That's a square instead of a question mark this time.

code:
1
2
3
4
5
6
7
8
jcapraro@hoshimaru bin $ java test
Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct
> &#65533; <
> &#65533; <
> &#65533; <
> &#65533; <
> &#65533; <
&#65533;&#65533;&#65533;


I really have no idea how to solve this. Didn't bother programming with accents before though. This time however it would be very usefull, as I'm writing a tool for data matching and one of the steps is converting from accentuated characters to normal ones.

I need something that covers all european accents in French, German, Spanish and Portuguese. Priority is French right now, as most data to be matched will be French and English.

Would unicode be a better alternative (Chinese, Japanese, Thai, etc ? )

Anyway, how do I set this up?

Thank you in advance.

  • moto-moi
  • Registratie: Juli 2001
  • Laatst online: 09-06-2011

moto-moi

Ja, ik haat jou ook :w

Mjah, als jij te lui bent om je bericht in het nederlands te typen, dan ben ik te lui om er een antwoord op te typen :z

God, root, what is difference? | Talga Vassternich | IBM zuigt


Dit topic is gesloten.