Friday 4 January 2019

php - cakephp page title with utf8 encoding

in cakephp website the page title is not replacing its special characters to corresponded utf encoded characters.To make sure i have already tried:




  • converted database to utf8_general_ci collation

  • first line of bootstrap.php: header('Content-Type: text/html; charset=utf-8');


  • core.php: Configure::write('App.encoding', 'UTF-8');

  • in database.php: 'encoding' => 'utf8' while creating database connection

  • in ajax.ctp (my site is using this layout): echo $this->Html->charset('UTF-8');

  • in header.ctp of the file for which i want to set the title: echo $title_for_layout; enclosed within the title tag.



I've tried a lot and instead doing all of this ,page title is still showing special characters.Can anyone tell me what i'm missing or anything else?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...