| Forfatter |
Besked |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: u8tf Encoding Problem After upgrade Skrevet: Tor Dec 28, 2006 1:52 pm |
|
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?
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
NanoCaiordo


Indmeldt: Jun 29, 2004 Indlæg: 3300 Geografisk sted: -37.805°, 145.036°
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Tor Dec 28, 2006 2:38 pm |
|
are you upraging to RC2?
_________________ .:: I called myself but someone else answered ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Tilbage til toppen |
|
 |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Tor Dec 28, 2006 5:39 pm |
|
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!
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
NanoCaiordo


Indmeldt: Jun 29, 2004 Indlæg: 3300 Geografisk sted: -37.805°, 145.036°
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 2:02 am |
|
on includes/config.php try to change
PHP:
//from define('DB_CHARSET', 'utf8'); //to define('DB_CHARSET', NULL);
_________________ .:: I called myself but someone else answered ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Tilbage til toppen |
|
 |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 11:35 am |
|
Hey thanks Nano! That did the trick the charaters are now showing correctly. Except a few like these ```
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 11:36 am |
|
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?
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
NanoCaiordo


Indmeldt: Jun 29, 2004 Indlæg: 3300 Geografisk sted: -37.805°, 145.036°
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 12:17 pm |
|
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 called myself but someone else answered ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Tilbage til toppen |
|
 |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 12:32 pm |
|
So in other words leave it be!
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
NanoCaiordo


Indmeldt: Jun 29, 2004 Indlæg: 3300 Geografisk sted: -37.805°, 145.036°
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 12:49 pm |
|
well i did converted all my data to utf8 even because thats the future.
_________________ .:: I called myself but someone else answered ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Tilbage til toppen |
|
 |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 1:17 pm |
|
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?
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
NanoCaiordo


Indmeldt: Jun 29, 2004 Indlæg: 3300 Geografisk sted: -37.805°, 145.036°
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 1:44 pm |
|
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 called myself but someone else answered ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Tilbage til toppen |
|
 |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 2:33 pm |
|
I tried your suggestions still no change
an example: in database -> "sàperstàrs!"
on website -> "sàperstàrs!" Config -> UTF8
on website -> "süperstärs!" Config -> NULL
All the database tables say: utf8_general_ci
It's the data itself that is buggered! I need to dumb the database and run some kind of converter me thinks!
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
NanoCaiordo


Indmeldt: Jun 29, 2004 Indlæg: 3300 Geografisk sted: -37.805°, 145.036°
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 2:53 pm |
|
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 called myself but someone else answered ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Tilbage til toppen |
|
 |
PartyMarty


Indmeldt: Apr 24, 2005 Indlæg: 156
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 3:00 pm |
|
Well no what kind of converter should I use? Or how do I convert it?
PartyMarty'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 |
|
| Tilbage til toppen |
|
 |
NanoCaiordo


Indmeldt: Jun 29, 2004 Indlæg: 3300 Geografisk sted: -37.805°, 145.036°
|
Tråd: Re: u8tf Encoding Problem After upgrade Skrevet: Fre Dec 29, 2006 4:04 pm |
|
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 called myself but someone else answered ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Tilbage til toppen |
|
 |