Databases with different encodings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vangelis Natsios

    Databases with different encodings

    I run a MySQL Server (v. 4.1.5-gamma) from a binary distribution on a
    SuSE 7.0 Linux. The default character set for the server is utf8 (runs
    with the flag --default-character-set=utf8). The utf-8 encoded databases
    I have seem to work fine. But I want to create another database with
    greek (iso-8859-7) encoding from a dump from a 3.23.X server with
    default character set "greek". Is this possible?

    When I try to feed the dump into my server (mysql < DUMPFILE) as it is,
    I see the greek but I can't get the sorting correct. When I change the
    dump file (CREATE DATABASE ... CHARACTER SET greek) I cannot see the
    greek text.

    Furthermore, when I try to get the texts from a php page, I can't get it
    right either way. Any ideas?

    Also, is there a way to set the database encoding to something else than
    the default in php? I see there' s a "mysql_client_e ncoding" function,
    but no function like "set_mysql_clie nt_encoding".

    And another thing. I get the utf8-encoded greek correct on php pages
    when I build php with "--with-mysql", which uses Client API version
    3.23.49. If I build it with "--with-mysql=/usr/local/mysql" (where I
    have installed MySQL 4.1.5) yielding Client API version "4.1.5-gamma" in
    phpinfo(), I also get the greek text wrong (every character shows as
    "?"). Is there something I should configure at the Client API, and how
    do I do that?

    Thanks in advance

    Vangelis Natsios
Working...