I tried this, but somehow it didnt work out. what's the problem here?
i tried something here to convert some japanese characters to utf8 and them stroreged it in to my mysql table.somehow it gives me something like 紊?please help!!! System.out.println(new String("変換".getBytes("utf8"),"euc-jp"));
The code you posted takes a string, converts it to a byte array in UTF-8, and then converts that byte array to a string, but using euc-jp as the encoding. Why do you expect that to give you a correct result?