SO has the same question 'mysql change default table charset to database charset' asked before .I used the second answer to change my database default character set to utf-8 .
alter database mydatabase default character set utf8 collate utf8_general_ci;
But when I exported the database using phpMyAdmin
,though at the top I have
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
but for queries I have something like
--
-- Table structure for table `paras`
--
CREATE TABLE IF NOT EXISTS `paras` (
`p_id` int(11) NOT NULL AUTO_INCREMENT,
`para` text,
PRIMARY KEY (`p_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
where charset=latin1
.IMO it shouid be set to UTF-8
.Am I confusing something or what is the correct way?