File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes simple problem Convert latin1 to UTF-8 in MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "simple problem Convert latin1 to UTF-8 in MySQL" Watch "simple problem Convert latin1 to UTF-8 in MySQL" New topic
Author

simple problem Convert latin1 to UTF-8 in MySQL

alsoumahi alBatal
Ranch Hand

Joined: Nov 22, 2009
Posts: 94
Hi guys , I have created Latin database called arabicUser with no values, then I converted to utf8 using this command below in order to insert Arabic letters:
here is my table arabicUser:
create table arabicUser(
userID int not null auto_increment,
name varchar(20),
university varchar(20),
profession varchar(20),
primary key(userID)
);
I converted it using ALTER TABLE arabicUser CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

now it is like this:
Create Table: CREATE TABLE `arabicuser` (
`userID` int(11) NOT NULL auto_increment
`name` varchar(20) default NULL,
`university` varchar(20) default NULL,
`profession` varchar(20) default NULL,
PRIMARY KEY (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

does it mean I can now insert Arabic characters into table , I have tried this below:

insert into arabicUser(name, university, profession)
values("???","???","???");< br/>
but it shows not correct characters something not understood, why is that , and if I put
select * from arabicuser;
it shows also the not clear characters .

please tell me where I am wrong what step I miss to insert Arabic characters .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple problem Convert latin1 to UTF-8 in MySQL
 
Similar Threads
simple problem Convert latin1 to UTF-8 in MySQL
simple problem Convert latin1 to UTF-8 in MySQL
how to create sequence in mysql
ManyToOne relation with composite keys
Batch Insert with generated keys deals duplicate entry on unique