Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6019201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:23:11+00:00 2026-05-23T03:23:11+00:00

I am developping a Zend application. The data in my database is encoded in

  • 0

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 = "UTF-8"

but whenever I try to retrieve a String containing special characters like

{‘é’, ‘à’, ‘è’,…} in the db, the string doesn’t display unless I use the function : utf8_decode()

So I tried to set the charset to UTF-8 in :

Bootstrap :

protected function _initDoctype() {
      $this->bootstrap('view');
      $view = $this->getResource('view');
      $view->doctype('XHTML_STRICT');
      $view->setEncoding('UTF-8');
 }

 protected function _initFrontControllerOutput() {

    $this->bootstrap('FrontController');
    $frontController = $this->getResource('FrontController');

    $response = new Zend_Controller_Response_Http;
    $response->setHeader('Content-Type', 'text/html; charset=UTF-8', true);
    $frontController->setResponse($response);

    $frontController->setParam('useDefaultControllerAlways', false);

    return $frontController;
}

Layout :

$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf8');
echo $this->headMeta();

application.ini :

resources.view.encoding = "UTF-8"
resources.db.params.charset = "utf8"

EDIT : Now I can display special chars in a page, but when I retrieve elements from the database, special chars are not displayed.

  • an escaped string returns null ($this->escape($string))
  • echo $string substitutes special chars with ?

so I still have to use utf8_decode() to display them. Any suggestion ?

thanks for your help !!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:23:12+00:00Added an answer on May 23, 2026 at 3:23 am

    Maybe you should try to edit your source files keeping UTF-8 as your editor’s encoding. Sometimes even if you use UTF-8 in your HTML headers, database encoding, etc, if your source files are in a different encoding, this could lead to that kind of errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a zend application.I have in config.ini: resources.db.adapter = PDO_MYSQL resources.db.isDefaultAdapter = true
I'm currently developping an application in java using Hibernate as a persistence manager and
In the application I'm developping (in Java/swing), I have to show a full screen
I'm having this weird thing happen. My Zend Framework (PHP) web application that I
Here's my problem. I'm developping an application using ZF 1.10.0, and I have a
I'm developing a zend framework application that includes a simple email function. The development
I am developing a web application with Zend Framework, and I am using JQuery
Im trying to learn how to set up a Zend framework web application from
Is developping an EJB application is considered like a web services ? Or the
I am developping a Cocoa application and I have a special need. In my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.