Page 1 of 1

Unicode problem

Posted: Fri Jul 15, 2011 9:21 am
by 16658762
Hello,
We develop our project in WAS(WebSphere)6.0 ,but the chinese char in the chart is the messy code. The environment of server is Ubuntu9+WAS6. How should we solve this problem?

Thanks!
Best Regards,
Candy

Re: Unicode problem

Posted: Tue Jul 19, 2011 11:39 am
by yeray
Hello Candy,

The following code seems to work fine for me here.

Code: Select all

import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

import com.steema.teechart.TChart;

public class Test {

	static TChart tChart1;
	
    public static void main(String [] args){
        final Display display = new Display();
        Shell shell = new Shell(display);
        shell.setLayout(new FillLayout());
        shell.setSize(600,400);
    
        createChart(shell);
        initializechart();
        
        shell.open();
        while (!shell.isDisposed()) {
        	if (!display.readAndDispatch()) {
        		display.sleep();
        	}
        }
        display.dispose();
    }

	private static void createChart(Shell tmpShell) {
		tChart1 = new TChart(tmpShell, 0);
	}
	
	private static void initializechart() {
		tChart1.getAspect().setView3D(false);

		com.steema.teechart.styles.Bar bar1 = new com.steema.teechart.styles.Bar(tChart1.getChart());
		bar1.add(20, "玩具");
		bar1.add(40, "椅子");
		bar1.add(30, "灯");
	}
}
Could you please send us a simple example project we can run as-is to reproduce the problem here?