0

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...

2
Contributors
12
Replies
13
Views
8 Years
Discussion Span
Last Post by network18
0

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 :)

Edited by network18: n/a

0

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...

0

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

0

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.

0

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

0

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

0

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.

0

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

0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.