Problems with display of UTF-8 encoded content from a DB

Posted by LookUp Webmaster on Stack Overflow See other posts from Stack Overflow or by LookUp Webmaster
Published on 2010-04-05T17:25:18Z Indexed on 2010/04/05 17:33 UTC
Read the original article Hit count: 276

Dear members of the Stackoverflow community,

We are developing a web application using the Zend Framework, and we are facing some encoding issues that we hope you might help us solve. The situation goes something like this: There are certain tables on a MySQL database that need to be displayed as html. Because the site is designed using the Spanish language, the database contains some characters like "á" or "ñ". Our internal policy is to set all the encodings as UTF-8, including all the databases and the tables. The problem is, that when we retrieve the content from the DB, some characters are displayed as question marks.

We are out of ideas. These are all the things that we have already tried and double-checked: 1. The SQL file from which we load all the data is properly UTF-8 encoded. 2. The SQL is loaded through phpmyadmin (which is configured as UTF-8), and the resulting tables are displayed properly. 3. The netbeans environment used for coding is also set as UTF-8.

The weird thing is that all the content that is hard-coded either as php or html is displayed properly. Only the values that are extracted from the database have issues.

Any ideas?

Thank you very much.

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework