Thread Starter
peersr
(@peersr)
just one more note: Unicode is displayed in database like windows-1250 ..
To be honest, I don’t understand why do you care what is in the database? And no, utf-8 characters do NOT look the same in the database as they are displayed. That’s normal.
The only important question is: do they display correctly in your browser? Do they display correctly in any browser? If yes, then don’t worry about things that are not important 🙂
Thread Starter
peersr
(@peersr)
problem is when trying to restore wp from db backup – with Czech characters.
At least I had problems.
That might happen because the encoding in one database is different than in the other, because of the wrong encoding settings in the database, because of different versions of MySQL…
Thread Starter
peersr
(@peersr)
OK – thanks for the answer.
On both hostings (former and new)they have PHP 5.
And MySQL 4.1.14 – 15
My DB and tables collation was in both cases UTF-8.
Anyway – I have to try it again.
Important for me is the thing you wrote about UTF-8 (I didnt know that UTF-8 characters do not look the same in DB as they are diplayed). Thank you again.
If you want to check whether or not correct unicode is stored in a database, Notepad++ can be extremely helpful. With this you can c/p any database content into the pad and display it as Unicode. If it displays correctly, the database has the correct content. It’s OSS:
http://notepad-plus.sourceforge.net/
Thread Starter
peersr
(@peersr)
thanks – I did a try – it doesn’t display correctly in Notpad++ ..
Did you use code/display as UTF-8 in the tab “formatting”?
Very curious. And it displays correctly in the blog itself? Usually faulty UTF-8 doesn’t.
What does the header say as encoding?
Thread Starter
peersr
(@peersr)
yes- with code/display as UTF-8 Czech characters in Notepad++ are different, but not correct-
and yes – in blog itself it displays correctly – strange
Thread Starter
peersr
(@peersr)
now – I did a fresh install – everything is correct – DB collation UTF-8 – with identical results
Thread Starter
peersr
(@peersr)
header?
<head profile=”http://gmpg.org/xfn/11″>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
Just in which way are the chars in the DB “faulty”?
Can you paste a couple in here, your DB version and the correct display version?
Thread Starter
peersr
(@peersr)
These are Czech characters (I hate them these days):
ěščřžýáíéĚŠČŘŽÝÁÍÉŇĎĽŤ
this is how they are in DB:
ěšÄřžýáÃéĚŠČŘŽÃÃÃÉŇĎĽŤ
MySQL: Client API version 4.1.13
collation: utf8_general_ci