WordPress.org

Support

Support » How-To and Troubleshooting » Strange WP behavior: Correct Czech in browser – incorrect in database

Strange WP behavior: Correct Czech in browser – incorrect in database

Viewing 15 replies - 1 through 15 (of 18 total)
  • 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 🙂

    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…

    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/

    thanks – I did a try – it doesn’t display correctly in Notpad++ ..

    Did you use code/display as UTF-8 in the tab “formatting”?

    yes I did

    Very curious. And it displays correctly in the blog itself? Usually faulty UTF-8 doesn’t.

    What does the header say as encoding?

    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

    now – I did a fresh install – everything is correct – DB collation UTF-8 – with identical results

    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?

    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

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Strange WP behavior: Correct Czech in browser – incorrect in database’ is closed to new replies.