• Post Reply Bookmark Topic Watch Topic
  • New Topic

Does mysql3.2x.xx support Chinese?

Sam Wang
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/test");
String sql = "INSERT INTO Item(id,name) VALUES (?,?)";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setString(2,new String(item.name.getBytes("ISO-8859-1"),"GBK"));
name field include "???"
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!