u8tf Encoding Problem After upgrade
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks
Author Message
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: u8tf Encoding Problem After upgrade
Posted: Thu Dec 28, 2006 1:52 pm
Reply with quote

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
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Thu Dec 28, 2006 2:38 pm
Reply with quote

are you upraging to RC2?
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Thu Dec 28, 2006 5:39 pm
Reply with quote

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
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 2:02 am
Reply with quote

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

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

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 11:35 am
Reply with quote

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
Back to top
View user's profile Visit poster's website
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 11:36 am
Reply with quote

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
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 12:17 pm
Reply with quote

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! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 12:32 pm
Reply with quote

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
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 12:49 pm
Reply with quote

well i did converted all my data to utf8 even because thats the future.
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 1:17 pm
Reply with quote

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
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 1:44 pm
Reply with quote

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! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 2:33 pm
Reply with quote

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
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 2:53 pm
Reply with quote

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! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
PartyMarty
Heavy poster


Joined: Apr 24, 2005
Posts: 156

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 3:00 pm
Reply with quote

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
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: u8tf Encoding Problem After upgrade
Posted: Fri Dec 29, 2006 4:04 pm
Reply with quote

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! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks All times are GMT
Go to page 1, 2  Next
Page 1 of 2


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Dedicated Server & Bandwidth Sponsored by DedicatedNOW
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.604 seconds with 19 DB Queries in 0.1907 seconds
Memory Usage: 3.02 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy