I am trying to insert unicode characters from excel file into phpmyadmin database through coding,but database is not accepting unicode characters and even date type,please help me if anyone having idea abt this,even i tried by converting .xls to csv format but .csv file does not support unicode characters and not even date,English characters are working but not unicode...please help me for this...

I am trying to insert unicode characters from excel file into phpmyadmin database through coding,but database is not accepting unicode characters and even date type,please help me if anyone having idea abt this,even i tried by converting .xls to csv format but .csv file does not support unicode characters and not even date,English characters are working but not unicode...please help me for this...

which database you using; also post the table structure here like this -

CREATE TABLE `keywords_master` (
  `keywords_id` bigint(1) NOT NULL AUTO_INCREMENT,
  `keywords` varchar(30) DEFAULT NULL,
  `cat_id` bigint(1) NOT NULL,
  `ent_date` datetime DEFAULT NULL,
  PRIMARY KEY (`keywords_id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin

Note the DEFAULT CHARSET in the definition as "utf8", that's makes the difference :)

I m using phpmyadmin and structure of my table is
CREATE TABLE `test1` (
`Date` DATE NOT NULL ,
`Word` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_bin;
please help if possible...

I m using phpmyadmin and structure of my table is
CREATE TABLE `test1` (
`Date` DATE NOT NULL ,
`Word` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_bin;
please help if possible...

Its all right then, mysql's utf8 character set supports unicode data, there might be some other problem in the script

there is not at all problem with the structure of the table,actually i m not getting how to insert unicode characters thr coding from .xls file to database.

there is not at all problem with the structure of the table,actually i m not getting how to insert unicode characters thr coding from .xls file to database.

In this case you can head in two approaches -
- one use of some external plugin (like one I mentioned in my first post) to parse the excel sheet (little bit tedious and time consuming..!)
- second way to save the file as the .csv and parse it (I will recommend this approach if, its one time activity and by this way you just need to populate the database single time)
Now figure out your needs and proceed in that way, if you get stuck up somewhere, post back, we will help you

will .csv file support unicode characters??

will .csv file support unicode characters??

CSV format can not properly display unicode fonts

can we use .dbf format to store unicode characters and import that file to database??

can we use .dbf format to store unicode characters and import that file to database??

what matters more is your database supports the unicode. search for the charset on the mysql database, one informative page is here
Character set is what decides to provide the support to which characters in your database.

Yes i understood ..but what i want to do is i have to import .xls file containing unicode characters into database thr coding...

can we directly insert values frm excel file to my database thr coding without parsing or converting it to .csv...

can we directly insert values frm excel file to my database thr coding without parsing or converting it to .csv...

yes you can,with excelReader(see the link in the first post).you can import it to the database as it is, if there is no data check like already existing duplicate records etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.