Displaying Unicode Characters
I wrote a java program that writes strings to a file. The strings contain foreign language characters. When I run the program in Windows, the output file shows the foreign characters. However, when I attempt the same operation in Linux, the output file shows a white question mark in a black background instead of the foreign characters.
The same Linux system could display the foreign characters if I copy the output file from Windows to Linux. I tried to create the output file using gedit that my program would then add additional strings to and chose Unicode-32 for encoding but still the same problem.
I read online that Java uses Unicode, while other sources states UTF-16.
Some of the encoding available on gedit (text editor) are Unicode UCS-2, Unicode UTF-32, Unicode UTF-16LE, Unicode UTF-16BE, Unicode UTF-16, Unicode UTF-7, Unicode UCS-4.
What could I do to get the program to display the foreign language characters from output text file?
Your help will be much appreciated,