I am using the MVC functionality in the Zend Framework 1.9, and it appears that Zend_Layout is not encoding the view content using UTF-8, despite this being set in the heading.
The layout script is shown below.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $this->headTitle(); ?>
<?php echo $this->headMeta(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<p>£ $ £</p>
<?php echo $this->layout()->content; ?>
</body>
</html>
The view script can be found below.
<p>£ $ £</p>
In the layout, the pound symbol outputs as you would expect, but it doesn't render inside the actual view.
If I remove the layout and just output the view, it comes out fine. Also if I put the $this->layout()->content inside utf8_encode it all works dandy.
I just want to know if there is a way to fix this issue IN the Zend Framework.