Zend Framework and UTF-8 characters (æøå)

Posted by Randy Mayer on Stack Overflow See other posts from Stack Overflow or by Randy Mayer
Published on 2010-04-14T16:58:26Z Indexed on 2010/04/14 17:03 UTC
Read the original article Hit count: 324

Filed under:

Hi,

I use Zend Framework and I have problem with JSON and UTF-8.

Output

\u00c3\u00ad\u00c4\u008d
íÄ

I use...

JavaScript (jQuery)

  • contentType : "application/json; charset=utf-8",
  • dataType : "json"

Zend Framework

  • $view->setEncoding('UTF-8');
  • $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
  • header('Content-Type: application/json; charset=utf-8');
  • utf8_encode();
  • Zend_Json::encode

Database

  • resources.db.params.charset = "utf8"
  • resources.db.params.driver_options.1002 = "SET NAMES utf8"
  • resources.db.isDefaultTableAdapter = true

Collation

utf8_unicode_ci

Type

MyISAM

Server

  • PHP Version 5.2.6

What did I do wrong? Thank you for your reply!

© Stack Overflow or respective owner

Related posts about zend-framework