Can't solve strange problem with encoding, urgent help needed |
[eluser]Base Willy[/eluser]
Hi to all Igniters! I've got a pretty strange problem. Let's have a look at http://my.pitomec.ru/test - there we can see serialised data from session table created by OB Session. The problem is that sometimes this data comes in a wrong encoding. Not always, but sometimes pretty often. Is you press F5 several times you could see that sometimes there are squares instead of cyrillic text. Database is in utf8_general_ci and i do "SET NAMES utf8" and that problem appears just here, in the session. That causes an error during unserializing data and session doesn't work well Let's try to find why does that happen. Thanks in advance!
[eluser]Base Willy[/eluser]
Small update: when data is not in utf8, it's in win1251 whyyyyyy?!
[eluser]Base Willy[/eluser]
I've just figured that everyone except me saw only blank page at http://my.pitomec.ru/test , sorry :-) Just fixed it and now you can see the trouble.. help steel wanted
[eluser]Base Willy[/eluser]
Ahhh nevermind, i've figured it out:-) Session creates a separate database connection and it didn't do "set names utf8", added it and everything fine at last
[eluser]Derek Allard[/eluser]
LOL! This is the strangest thread I've read in a while I look forward to you sharing your experience with others on the forums base willy, and glad you got it solved.
[eluser]autoreverse[/eluser]
Glad you found a solution. I do all my work in UTF-8 so until a fix is available (see http://ellislab.com/forums/viewthread/61656/) I've hacked CodeIgniter/database/drivers/mysql/mysql_driver.php as follows: Code: // --------------------------------------------------------------------
[eluser]Base Willy[/eluser]
autoreverse, thanks, that seems like a good one too |
Welcome Guest, Not a member yet? Register Sign In |