Home Private Messages Search
CPG Dragonflyâ„¢ CMS Dedicated Server & Bandwidth Sponsored by DedicatedNOW
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks :: Archives ⇒ u8tf Encoding Problem After upgrade :: Archived


u8tf Encoding Problem After upgrade :: Archived
Need help creating a block or add-on, or you have created or modified a block/add-on that works in Dragonfly CMS and it meets the CPG Security Requirements? Do you have feedback about a specific add-on? Here is the place to post. Read the announcements here first!.
Go to page 1, 2  Next
Post new topic    Revive this topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & Blocks

Topic Archived View previous topic :: View next topic  
Author Message
PartyMarty
Heavy poster
Heavy poster

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Thu Dec 28, 2006 1:52 pm
Post subject: 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?


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
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Thu Dec 28, 2006 2:38 pm
Post subject: Re: u8tf Encoding Problem After upgrade

are you upraging to RC2?

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

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


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

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Thu Dec 28, 2006 5:39 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Fri Dec 29, 2006 2:02 am
Post subject: Re: u8tf Encoding Problem After upgrade

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

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


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

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Fri Dec 29, 2006 11:35 am
Post subject: Re: u8tf Encoding Problem After upgrade

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
Heavy poster

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Fri Dec 29, 2006 11:36 am
Post subject: Re: u8tf Encoding Problem After upgrade

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
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Fri Dec 29, 2006 12:17 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


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

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Fri Dec 29, 2006 12:32 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Fri Dec 29, 2006 12:49 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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

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

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


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

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Fri Dec 29, 2006 1:17 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Fri Dec 29, 2006 1:44 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


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

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Fri Dec 29, 2006 2:33 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Fri Dec 29, 2006 2:53 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


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

Offline Offline
Joined: Apr 24, 2005
Posts: 156

PostPosted: Fri Dec 29, 2006 3:00 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: Fri Dec 29, 2006 4:04 pm
Post subject: Re: u8tf Encoding Problem After upgrade

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

Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10


NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
mixed
Back to top
View user's profile Visit poster's website Photo Gallery
Display posts from previous:   
Post new topic    Revive this topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & Blocks
Page 1 of 2
All times are GMT
Go to page 1, 2  Next

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
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

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
Interactive software released under GNU GPL, Code Credits, Privacy Policy