regdude Posted November 28, 2009 Share Posted November 28, 2009 Hi! I'm using now mysql server 5.1.37-2 and I was using mysql server 5.0.70! So when I moved from one server to another I had problems with encoding because I get "????�" instead of "ĀĀĀĀŠ" (from UTF8). All database data seems to be in UTF8 and in phpmyadmin everything even shows up right!! But not in the web page (I did also change PHP and web server). I have tried many ways to get this working but none of them seem to be working. I have tried simply copying the DB files, I have tried mysqldump, I have tried phpmyadmin export, I have tried converting all this to latin1 then utf8, but nothing helps. Everything worked fine with my forum, it displayed all characters right, but now it only shows up right characters when I start a new forum entry, the old ones are messed up. Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/ Share on other sites More sharing options...
fenway Posted November 29, 2009 Share Posted November 29, 2009 Have you set UTF8 after connecting? Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-967467 Share on other sites More sharing options...
regdude Posted November 29, 2009 Author Share Posted November 29, 2009 Well I tried to set some things that are related to UTF8, but didn't seem to work, but I do recall one time when I had such a problem (also a migrating problem) and "SET names UTF8" did solve the problem, now it didn't but I think it's just the wrong place. I'm using a phpbb2 forum. Is it possible to avoid this code set so that it will allways use UTF8? I really don't want to change every single page. Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-967563 Share on other sites More sharing options...
fenway Posted November 29, 2009 Share Posted November 29, 2009 A simple require_once() script will help you. I'd post a helpful topic for reference, but my bookmarks seem to have disappeared. Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-967714 Share on other sites More sharing options...
regdude Posted November 29, 2009 Author Share Posted November 29, 2009 I forgot to tell you and don't know why this forum doesn't have an edit button. Ok, the thing is that everything from the DB is messed up, but a new entry in the DB shows up fine! Is this problem still related with setting UTF8 before connecting? Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-967717 Share on other sites More sharing options...
fenway Posted November 30, 2009 Share Posted November 30, 2009 How have you determined that the DB is "messed up"? are you looking directly at it? Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-968461 Share on other sites More sharing options...
regdude Posted November 30, 2009 Author Share Posted November 30, 2009 Through the forum. Every old entry in the database shows up like "????", but a new entry (a post in the forum) shows up fine like "āāāā". Through phpmyadmin it shows up also fine. Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-968474 Share on other sites More sharing options...
fenway Posted December 1, 2009 Share Posted December 1, 2009 And you're certain that the old DB was working correctly before? Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-968879 Share on other sites More sharing options...
regdude Posted December 1, 2009 Author Share Posted December 1, 2009 Yes. But as I said I have changed the servers. What I think here is simply the old data being exported wrong. How should be the data exported? Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-969067 Share on other sites More sharing options...
fenway Posted December 4, 2009 Share Posted December 4, 2009 How did you do it? Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-971229 Share on other sites More sharing options...
regdude Posted December 8, 2009 Author Share Posted December 8, 2009 I have tried simply copying the DB files, I have tried mysqldump, I have tried phpmyadmin export, I have tried converting all this to latin1 then utf8, but nothing helps. Quote Link to comment https://forums.phpfreaks.com/topic/183238-encoding-problem/#findComment-973646 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.