My java program is reading from a web page a simple line of UTF-8 encoded characters (Chinese and Latin). My problem is that on the Nokia Series 40 emulator I am successfully able to read the characters and display on the screen (in Chinese), but on a real device i get boxes instead of characters (somewhat like: []). I am sure my device can display Chinese characters appropriately when they are hardcoded in the midlet, but can't draw out when i read from a web page.
The code I am using to read in the characters is:
Thanks for any help. I've been digging through the messageboard but have had no luck with this situation. Any help is greatly appreciated!!!Code:StringBuffer data = new StringBuffer(); try { strConn = (StreamConnection)Connector.open(server + "/" + message); System.out.println(server + "/" + message); in = strConn.openInputStream(); InputStreamReader isr = new InputStreamReader(in,"UTF-8"); int ch; boolean done = false; while ((ch = isr.read()) > -1) { data.append((char)ch); } String[] response = myValues(data.toString()); // my function return response; }

Reply With Quote

