Re: problem with java displaying unicode, under ms-windows
On 7/22/2012 5:47 AM, Philip Brown wrote:
Could someone who knows about these things, and is currently running
ms-windows, please take a moment to download the program and verify
I don't download code, as a rule. Can you produce a simple, short,
complete, compilable example that prints a few characters from the range
you are interested in, and post the source here? That I will look at.
Contrariwise, if you still think it's my program that is broken:
please provide a java program that I can freely download and run,
This works for me:
package quicktest;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
/**
*
* @author Brenden
*/
public class UpperCodepoint {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
StringBuilder stb = new StringBuilder();
stb.appendCodePoint(0x20FF0);
JFrame frame = new JFrame();
JTextArea ta = new JTextArea();
frame.add(ta);
ta.setText(stb.toString());
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setSize(500, 500);
frame.setVisible(true);
}
});
}
}