• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
utf8 problem

#1
hi everyone

i have a problem with codeigniter character encoding. when i insert persian words in mysql in phpmyadmin , my output is '?????'. when insert data in form my character is ' آزمایشی ' but output it's ok.

PHP Code:
$active_group 'default';
$active_record TRUE;
 
$db['default']['hostname'] = 'mysql:host=localhost;dbname=pmanagemnet;';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'pmanagement';
$db['default']['dbdriver'] = 'pdo';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_persian_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE

Quote:Database collation : utf8_persian_ci
Quote:header : <meta charset="utf-8" />

php.ini => default_charset = utf-8
Reply

#2
update....
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.