Connecting Tech Pros Worldwide Help | Site Map

Databases with different encodings

Vangelis Natsios
Guest
 
Posts: n/a
#1: Jul 23 '05
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_encoding" function,
but no function like "set_mysql_client_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
Closed Thread