David Balch
2007-12-30 10:25:04 UTC
Hi,
I'm having problems getting character encoding working properly using
MDB2 - e.g. curly apostrophe, o with an umlaut, etc. are replaced with
question marks, even though the character encoding of my page is
UTF-8.
I'm pretty sure that the database is set to UTF-8, as:
1) the characters are displayed ok on UTF-8 pages in phpMyAdmin, and
2) exporting the DB as SQL from phpMyAdmin, gives a CREATE TABLE
statement including "DEFAULT CHARSET=utf8"
It looks like MDB2 is returning the data as ISO-8859-1, as when I set
the page's character encoding to ISO-8859-1, the special characters
display ok (and some other characters on the page don't).
I've tried MDB2 with both the mysql and mysqli drivers, and both show
the same behaviour.
Any ideas where I should look to solve this?
Cheers,
Dave
Setup info...
Ubuntu 7.10
MYSQL:
Server version: 5.0.45-Debian_1ubuntu3.1-log
MySQL client version: 5.0.45
PHPMyAdmin:
2.10.3deb1ubuntu0.1
PEAR:
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.2 stable
MDB2 2.4.1 stable
MDB2_Driver_mysql 1.4.1 stable
MDB2_Driver_mysqli 1.4.1 stable
PEAR 1.5.4 stable
Structures_Graph 1.0.2 stable
I'm having problems getting character encoding working properly using
MDB2 - e.g. curly apostrophe, o with an umlaut, etc. are replaced with
question marks, even though the character encoding of my page is
UTF-8.
I'm pretty sure that the database is set to UTF-8, as:
1) the characters are displayed ok on UTF-8 pages in phpMyAdmin, and
2) exporting the DB as SQL from phpMyAdmin, gives a CREATE TABLE
statement including "DEFAULT CHARSET=utf8"
It looks like MDB2 is returning the data as ISO-8859-1, as when I set
the page's character encoding to ISO-8859-1, the special characters
display ok (and some other characters on the page don't).
I've tried MDB2 with both the mysql and mysqli drivers, and both show
the same behaviour.
Any ideas where I should look to solve this?
Cheers,
Dave
Setup info...
Ubuntu 7.10
MYSQL:
Server version: 5.0.45-Debian_1ubuntu3.1-log
MySQL client version: 5.0.45
PHPMyAdmin:
2.10.3deb1ubuntu0.1
PEAR:
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.2 stable
MDB2 2.4.1 stable
MDB2_Driver_mysql 1.4.1 stable
MDB2_Driver_mysqli 1.4.1 stable
PEAR 1.5.4 stable
Structures_Graph 1.0.2 stable
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php