开发者

Zend Sqlite utf 8

开发者 https://www.devze.com 2023-02-05 04:04 出处:网络
sorry to bother you. I\'m wondering if using utf 8 in sqlite is the same of mysql therefore it\'s enough

sorry to bother you.

I'm wondering if using utf 8 in sqlite is the same of mysql therefore it's enough set this lines in application.ini

resources.db.adapter = "PDO_SQLITE" 

resources.db.params.dbname = APPLICATION_PATH "/../data/db/guestbook.db" 

resources.db.params.charset = UTF8 

resources.db.isDefaultTableAdapter = true 


or I should do a query in my bootstrap like

PRAGMA encoding = "UTF-8"; 

BTW where does zf do the开发者_StackOverflow work (I mean in which class) ?

Bye.


I dont see anything in

  • http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Db/Adapter/Pdo/Sqlite.php

that suggests a charset option will be applied if given.


In The Definitive Guide to SQLite I found [Some settings such as page size and character encoding (UTF-8, UTF-16, etc.) cannot be changed once the database is created, so this interim is where you have a chance to specify them.]

So you should set the utf 8 encoding in the script where you create the DB.

0

精彩评论

暂无评论...
验证码 换一张
取 消