Hi, I'm not sure if UTF-8 is working, as it should, I’m pretty new to Drupal, Mysql and PHP.
The thing is that everything is looking good in Drupal, Swedish characters is working as expected. But when I’m using phpmyadmin or "Mysql command line client" to look at the data, Swedish characters is junk, the character ä (letter a with two dots over) become ä.
When I’m in a Drupal page is writing "$result = db_query("SELECT * FROM {term_data} d....", the Swedish characters is also junk.
If i dump some data from phpmyadmin the letter ä is 0xc383c2a4 (is this the character ä)??
When I’m doing what http://drupal.org/node/40515 (and other treads) suggests, I’m getting this on every page:
Notice: unserialize() [function.unserialize]: Error at offset 42 of 46 bytes in C:\sites\drupal\includes\bootstrap.inc on line 197
Notice: unserialize() [function.unserialize]: Error at offset 28 of 32 bytes in C:\sites\drupal\includes\bootstrap.inc on line 197
Notice: unserialize() [function.unserialize]: Error at offset 34 of 43 bytes in C:\sites\drupal\includes\bootstrap.inc on line 197
I'm using:
Drupal 4.7.0 beta
PHP 5.1.1 (tried with 5.0.5 before)
MYSQL 5.0.16 (tried with 4.1.15 before)
IIS 6
Server variables and settings from PHPMyadmin:
character set client utf8 utf8
character set connection utf8 utf8
character set database utf8 utf8
character set results utf8 utf8
character set server utf8 utf8
character set system utf8 utf8
character sets dir C:\Program Files\MySQL\MySQL Server 5.0\share\charsets\ C:\Program Files\MySQL\MySQL Server 5.0\share\charsets\
collation connection utf8_general_ci utf8_general_ci
collation database utf8_general_ci utf8_general_ci
collation server utf8_general_ci utf8_general_ci
Drupal database:
utf8_bin everywhere
Comments
more info
correction:
If i dump some data from phpmyadmin the letter ä is 0xc383c2a4 (is this the character ä)??
should be:
If i dump some data from phpmyadmin the letter ä is 0xc3a4 (is this the character ä)??
those notices look like they
those notices look like they are pulling data out of the database which were stored incorrectly, and trying to interpret them correctly.
as a wild guess, try deleting your {cache} table.
if that doesn't help, you need to apply http://drupal.org/node/40515 before you start creating any rows in your database, so that your data gets stored correctly from the start.
Treehouse
Works
Thank you so much !
I did what you suggested, deleted the temp-table and inserted the code in database.mysql.inc but same fault:
Notice: unserialize() [function.unserialize]: Error at offset 42 of 46 bytes in C:\sites\drupal\includes\bootstrap.inc on line 197
Notice: unserialize() [function.unserialize]: Error at offset 28 of 32 bytes in C:\sites\drupal\includes\bootstrap.inc on line 197
Notice: unserialize() [function.unserialize]: Error at offset 34 of 43 bytes in C:\sites\drupal\includes\bootstrap.inc on line 197
So after that i created a new drupal-database, created a node with a Swedish character and of course the error was still there, that is, correct character in Drupal but strange one in phpmyadmin and in Mysql command line client. Then i did what you suggested at http://drupal.org/node/40515.
The only existed node that was in the database then showed up as junk character even in drupal. When i then re-edit the node in drupal to the Swedish character again everything is OK everywhere.
I dont know what else i had to delete in the previous drupal database to get it to work, i'm happy with this solution but for anyone else having this problem i dont have a suggestion.