Estou tentando setar o encoding para as views, contudo não está sendo setado. Todas as páginas estão usando UTF-8, no application.ini tenho a seguinte linha:
- Código: Selecionar tudo
resources.view.encoding = "UTF-8"
E meu bootstrap está assim:
- Código: Selecionar tudo
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
public function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(
array(
'namespace' => '',
'basePath' => APPLICATION_PATH
)
);
return $autoloader;
}
public function _initLayouts()
{
Zend_Layout::startMvc();
$this->getPluginResource('frontController')
->getFrontController()
->registerPlugin(new Plugin_ModuleLayout());
}
protected function _initDoctype()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->doctype('XHTML1_STRICT');
}
public function _initDbProfile()
{
// não devemos nunca usar isto em produção,
// por essa razão temos esta condição (o melhor é ficar somente em
// desenvolvimento)
if ($this->getEnvironment() == 'development')
{
$profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
$db = $this->getPluginResource('db');
$db = $db->getDbAdapter();
$profiler->setEnabled(true);
$db->setProfiler($profiler);
}
}
}
Além disso, tenho o seguinte template do default (layout.phtml):
- Código: Selecionar tudo
<?php echo $this->docType(); ?>
<html>
<head>
<?php echo $this->headTitle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headScript(); ?>
<?php echo $this->headLink()->appendStylesheet('/css/global.css') ?>
</head>
<body>
<?php echo $this->layout()->content ?>
</body>
</html>
O que pode estar faltando para que a view sete o encoding como UTF-8?
Desde já agradeço,
André.



