wood burning stoves 2.0*
The moose likes JDBC and the fly likes insert chinese language to mysql db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "insert chinese language to mysql db" Watch "insert chinese language to mysql db" New topic
Author

insert chinese language to mysql db

Li Jenny
Ranch Hand

Joined: Apr 19, 2010
Posts: 57
i would like to ask how can i insert chinese character into db
as i type chinese in the textarea,then insert.
i view in db is become symbol (not eng and chinese)

need to set characterset in mysql and also set the characterset in jsp??
Ravinderjit Singh
Ranch Hand

Joined: Jan 13, 2010
Posts: 78
You should use UTF-8 character encoding like this.

create database yourdb CHARACTER SET utf8 COLLATE utf8_bin;
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: insert chinese language to mysql db