TextField “umlauts” are not shown on linux
Java 1.5, Linux
I do have a screen which contains different textareas and textfields. I do have acess to the application frame, but not to the components inside the frame, because i only get an implementation of an interface.
When i try to add german umlauts i see a rectangle in the text component, because the character is not supported. Which font or which system-propertiy i have to set to support "umlauts" under linux. On windows the characters are shown correctly.
It sounds like a character encoding problem or font problem... Like using "windows" encoding in a Linux environment. You should check the following:
- Can you write those characters in a normal texteditor in your linux distro?
- Are those characters from input files in your java application or is it from the source, if so what OS did you use to write the source?
- If they are from a source file or resource file, have you checked that the characters is actually readable in the sourcefile in Linux?
- If you open the sourcefile in for instance vim, what encoding does it use? (It usually says in the lower part of the screen just after you opened the file)
If you tell what happens when you do this, we may have a better idea of what is wrong. :)
UPDATE: The reason I wanted you to check this is that I know the so called "windows encoding" can create problems in other OS'es. You say you can write umlauts on the console but not in vi, what do you get instead, squares?
It does't matter that users isn't supposes to view the ini file, if you created the ini files manually in Linux I suppose you were able to write umlauts then. You should find out what character encoding these files and the TCP connection uses. It should be UTF-8, "Western" or "Windows" or "Latin-1" etc. may cause problems.
If everything is UTF-8, readable everywhere except in your application I would start to suspect a missing font issue.
My guess is that the desktop (KDE or Gnome) is configured to use a font which doesn't contain umlauts (kind of strange, today, but it happens). Java usually tries to use the system font as a basis to calculate the "Dialog" font (which is always available even if it is not installed; "Dialog" is a virtual font name which Java uses to say "Default sans-serif font").
- Check which fonts are installed with xlsfonts
- Check whether you can enter the umlauts in the console
- Try a different Java app
- Check $JAVA_HOME/jre/lib/fonts (IIRC). I think you can find font mappings in there.