-- Deepak <[email protected]> wrote
(on Wednesday, 25 March 2009, 10:45 PM +0800):
> I am having strange issue displaying the quote character (single or
> double quotes). The text I entered like
> ========
> Marak's
> "Earth Hour"
> ========
> is displayed like this
> ===================
> Mark\\\'s
> \\\\\\\"Earth Hour\\\\\\\"
Turn off magic_quotes_gpc, and then you'll also need to scrub your
database to remove the extraneous backslashes.
> ===================
>
> The query result is inside the <pre> element
>
> My backend DB is MySQL with ENGINE=InnoDB DEFAULT CHARSET=utf8
> COLLATE=utf8_unicode_ci
>
> In my bootstrap I have:
> ==================
> $pdoParams = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8;');
>
> $dbParams = array('host' =>
> $appConf->database->hostname,
> 'username' =>
> $appConf->database->username,
> 'password' =>
> $appConf->database->password,
> 'dbname' =>
> $appConf->database->database,
> 'driver_options' => $pdoParams
> );
> ==================
>
> In my view script I used $this->escape(<variable>)
>
>
> Any suggestion is greatly appreciated.
>
> Thanks
>
--
Matthew Weier O'Phinney
Software Architect | [email protected]
Zend Framework | http://framework.zend.com/