problem with database and charset

Good evening. I have a problem with the website I create for the graduation project of my university.
I do translate across the site in Greek and when I got to the point where I had to change things from the Database, I saw a problem with the charset. I have already saved files omeka encoded utf-8 but not solved anything. When i save anything from the Database to the website i saw ????, and when i save from my website at the Database appears characters which they cannot read.
I add code to php pages to change the utf-8 charset, but I have not found a solution yet. Can anyone help me

This Problem it's only at admin session and only at the items which do connect with the Database.
Also My Database and the tables are utf-8

I'm having a little trouble understanding exactly what your problem is.

Omeka already sets its database tables to store UTF-8 data, and sets all its pages to declare that they are displaying UTF-8 data.

Could you post a link or some screenshots of your issue?

ok sorry for my english!!
have a look at
http://tipografiki.gr/database.png and
http://tipografiki.gr/admin.png
you will understand my problem...

I'm not sure how much help we can be with this.

Omeka is pretty careful to maintain UTF-8 on everything that saved through the admin interface.

I suspect that there might be some issue with your phpmyadmin settings, since it looks like the parts you're having trouble with are ones that you manually edited.

Yes my problem it's only at the parts i have own did the translate...but.... i had double check my database and it's utf8_general_ci. (and the tables also)

Also i had saved all omeka files with utf-8 and also i had add
"header ('Content-type: text/html;charset=utf-8');
error_reporting(E_ALL);"

my professor don't know where the problem is....
Any Idea?
I had install and a fresh copy of omeka and the problem is the same :(

Could you share what phpMyAdmin displays for:

  • MySQL charset (should be on the right side of the front page)
  • MySQL connection collation (should be in a drop-down box on the left side of the front page, under the "Create new database" box).

Ideally, the MySQL charset should be "utf8", and the connection collation should be "utf8_general_ci". In particular, the connection collation can be set through the drop-down, and it affects how MySQL tries to convert the characters you enter in phpMyAdmin to store them in the tables.

If the connection collation is set wrong, you can get problems like this, even if the tables themselves have the correct charset.

no :((((

the database is correct... i transfer my site on localhost and this is my new database

http://tipografiki.gr/phpmyadmin.png

Then the last thing I can think of at the moment is to check what character set your browser is using when you're on that phpMyAdmin site.

I believe phpMyAdmin sets a meta-tag charset of UTF-8, but if your browser is picking a different charset (which could happen if auto-detection was disabled), your browser will be sending incorrectly-encoded data to phpMyAdmin and reading the phpMyAdmin pages incorrectly as well.

If this isn't the problem, it would help to know if the characters are immediately garbled after you save them in phpMyAdmin (they look bad right when the page refreshes to show the table) or if stuff input in phpMyAdmin looks fine on that side but only looks bad in Omeka (or vice-versa).

The problem is still there....
I check all the files again that are with encoding utf-8

i set auto-detection at explorer and the utf-8

www.tipografiki.gr/item.png

in the new database the characters don't garbled immediately. But they garbled if at the omeka site save the changes.

Check this steps i did

1) www.tipografiki.gr/db1.png
2) www.tipografiki.gr/item2.png
3) www.tipografiki.gr/db2.png

if i do not save any changes from the site the db is still the same

Two of the image links you posted (item2 and db2) are 404s.

And just to clarify, my earlier question was about what charset Internet Explorer was using when you were on the phpMyAdmin site, not an Omeka page.

The screenshot you posted of your browser showed that it was correctly using UTF-8 when viewing Omeka pages, but my concern was that it might be using another charset on the phpMyAdmin pages.

sorry the photos are ok now...

at phpmyadmin is the same with utf 8 and auto detection...

Another possible place to try to fix this charset wackiness:

Try adding the following lines:

// Force utf8 connection charset
$connectionParams['charset'] = 'utf8';

directly above this line in application/libraries/Omeka/Core/Resource/Db.php:

$dbh = Zend_Db::factory('Mysqli', $connectionParams);

nothing....
now on, I try to do a fresh install from the beginning because I can not find ANY fault solution and perhaps did something else from the beggining. Simply because is for my university and it is my final work must be translated into Greek.

i can't find any other solution.. i did what you told me, i restarted the server but the problem is the same.....

If you have your site or some copy of it somewhere that can be linked to, it's possible that someone could try to take a look at it, but I'm running out of ideas.

Clearly there's a character set problem here somewhere, but Omeka and phpMyAdmin declare UTF-8 (this is the case even without the header() line you added), your MySQL server and tables are set to UTF-8, and the connection charset should be guaranteed to be UTF-8 by that charset line from my last post (assuming you did put it above the $dbh line).

Saving Greek and other international characters works fine on my various installations, whether from phpMyAdmin or through Omeka's interface, and Omeka correctly handles international characters on several publicly-available sites.

Of course I've been assuming from the beginning that you're using the latest Omeka version (though even older versions haven't had reports of these kinds of problems).

i will do the new istallation because the problem is from the database... i will do some changes and if the problem is still there........

i will break it.... :P

thank you very much for your help and i will back soon to tell you what happen.....
Hope....i will not have problem again.... lets see...!

ehmm.... thanks very much.... I FIND THE PROBLEM!!!!!!
After 2 restarts on my xampp server.....

i saw that the site was ok... the problem solved with
// Force utf8 connection charset
$connectionParams['charset'] = 'utf8';

Only this two lines was necessary and nothing else....
sorry because i tired you a little...
thanks again!!!!