1
OeilNoir
Mysql5 and UTF-8 wrong encoding...
  • 2007/11/1 10:25

  • OeilNoir

  • Just popping in

  • Posts: 5

  • Since: 2007/2/20


I used Mysql4 for quite a while now and since Mysql5 is availlable at my provider, I want to upgrade to that. I know my way around MySQL a bit so I had no problem changing the settings in XOOPS to point to the right database and to insert everything into that new database via PhpMyAdmin.

Now my problem is this: everything in my database is in UTF-8 (I made sure of that since the first day I used the database in mysql4). I checked everything and I am viewing phpmyadmin in UTF-8, phpmyadmin is in UTF-8 and I see the data correctly (I use japanese and french on my site and all characters are fine). I made sure that XOOPS also is encoded in UTF-8. The browser is in that mode and the languages setting point to UTF-8 (and where set a long time ago when I first fired up xoops).

The data displayed on my browser displays bad characters. Wich can only mean that there is something wrong between XOOPS and the database (they are not in sink). I made sure of this by forcing the encoding of the transfered data with a "SET NAMES UTF8" function and then the data displays fine BUT once I log-off, I cannot login on my site anymore and can't navigate around.

If I don't do the "SET NAMES" function, All the characters I enter in the browser display fine but when I look in the database, they become corrupted. If I force the "SET NAMES" then enter the same characters again, they display fine in the browser and in the database.

My problem is I don't know the protocols to call data to and from the database in PHP so theres something I did wrong with that "SET NAMES" function.

Can somebody help me?

Login

Who's Online

258 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 258


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits