How to set charset to UTF-8 in a Zend application?

前端 未结 9 1464
失恋的感觉
失恋的感觉 2021-01-05 14:29

I am developping a Zend application. The data in my database is encoded in \"utf8_unicode_ci\". I declared in my application.ini :

resources.view.encoding =          


        
9条回答
  •  独厮守ぢ
    2021-01-05 15:12

    I used to develop ZF application with many languages including RTL ones . and I used to add this to my bootstrap file and I've found it pretty neat .

    maybe this not an answer but i think its good suggestion :

    public function _initMB(){
     mb_internal_encoding("UTF-8");
    }
    

    for more info about mb_internal_string check out : http://php.net/manual/en/function.mb-internal-encoding.php

提交回复
热议问题