Dragonfly CMS v9 ⇒ Modules & Blocks :: Archives ⇒ u8tf Encoding Problem After upgrade :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

Archived ⇒ u8tf Encoding Problem After upgrade


Hello Everyone!

I realize that there is a lot of topics on utf encodings in these forums but I have searched and read them all but I yet to figure out what to do!

After upgrading to from PhP-Nuke about a 1 year ago to some version of DF I decided to upgrade to the newest version fo Dragonfly. My upgrade whent with out a hitch except that all the special charaters, like ä have all been converted to junk. (example sà �perstà �rs!) I figured out already that this is a database encoding problem. I checked the database which has the charaters exactly like they show in dragonfly.

I whent in and changed the table and colum encoding from general_latin1 to utf_general..
But this had no effect what do I do the solve this problem?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


are you upraging to RC2?

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


No not yet I upgraded to a 9.1.0.8 CVS because I use the mod DF_modules by Biggles. As of now this mod does not work with RC2 becasue it has not been updated. It would cool if this could become part of standard Dragonfly it's really cool!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


on includes/config.php try to change
//from define('DB_CHARSET', 'utf8'); //to define('DB_CHARSET', NULL);

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Hey thanks Nano! That did the trick the charaters are now showing correctly. Except a few like these ```

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


Ha what do you know that charater doesn't show up properly here either!

So what does this all mean? Is my database incorrectly encoded? if so how do I fix it?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


The problem is a combinations of factors:

1.a your server upgraded from MySQL 4.0 to 4.1
1.b MySQL 4.0 did not supported utf8 while MySQL 4.1 does
1.c data was saved using a different encoding then utf8

2.a you upgraded Dragonfly from 9.0.6.1 to RC2
2.b 9.0.6.1 did not supported utf8 database connection because of MySQL 4.0 limitation while RC2 does
2.c data was saved using as different collocation then utf8 but now it is saved and readed using utf8 connections

3.a today MySQL 4.1, MySQL 5.X, PostgreSQL (always did) and Dragonfly fully supports utf8
3.b RC2 is able to establish utf8 database connections (governed by DB_CHARSET)
3.c your database, database tables and the data is still not encoded as utf8 but new data coming in it is saved as utf8.

Data is not corrupted, its just that they are talking using a different "slang".

Or you convert tables and data within tables from latin to utf8 or use NULL as DB_CHARSET.

Note: DragonflyCMS RC2, on install, will detect if the database support utf8 connections, since your current MySQL version does that then RC2 will use it, but there is not way to know if you never used MySQL 4.0 and/or correctly re-encoded your data after the MySQL upgrade.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


So in other words leave it be!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


well i did converted all my data to utf8 even because thats the future.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Ok I just did a test on my local database!

I dumbed the database and loaded it into Ultraedit. I then searched and replaced latin1 with utf8. Reinserted the database into mysql.

Now in phpmysqladmin all tables show up as utf8_general_ci but if go look in the forums where I am having problem the charaters are still wrong. (if Change Config back to NULL everything is ok)

I figure I need to convert the actual text in the database but how do I do this?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


within phpmyadmin make sure the the "database" default character set collocation is set to utf8.

Also when you load the data to phpmyadmin there it should be an option about loading data as utf8 or not. try both because seems like that your server "default" connection is not set to utf8.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


I tried your suggestions still no change

an example: in database -> "sÃÂ

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


PartyMarty wrote
I need to dumb the database and run some kind of converter me thinks!
I thought you might be did that already

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Well no what kind of converter should I use? Or how do I convert it?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows_NT/Apache/1.3.33 (Win32) PHP/4.3.10/4.1.9-max/4.3.10/9.0.4.0


PartyMarty wrote
I dumbed the database and loaded it into Ultraedit. I then searched and replaced latin1 with utf8. Reinserted the database into mysql.

Ultraedit is perfect.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head

All times are UTC