Stik Posted April 18, 2007 Share Posted April 18, 2007 I am running a game site on my own server using whitebox disto linux. My problem is that using PHP-Nuke and SMF forums I am unable to get "hexed" charachters to display correctly. I have checked the database using webmin and the information is stored correctly in MYSQL, and displays correctly within webmin. I am not sure if this is a PHP or Apache problem. www.guywitha.com/index.php You will see in the server stats block that the names are not displayed correctly. php info: www.guywitha.com/testphpinfo.php Thanks for any help. Quote Link to comment Share on other sites More sharing options...
btherl Posted April 18, 2007 Share Posted April 18, 2007 It looks like an encoding issue. What encoding do you use to store the names in mysql? It's likely you'll need to convert from that encoding to UTF-8. If your mysql data is UTF-8 already, then the data is getting mangled along the way somehow. Quote Link to comment Share on other sites More sharing options...
Stik Posted April 18, 2007 Author Share Posted April 18, 2007 Mysql is set to use UTF-8 encoding, and the information is stored correctly in MYSQL as I can view it as it should look using webmin. The problem seems to be in the displaying of the information on the web page. and it seems to be something to do with the setup of my server as other sites using the same scripts seem to display the info correctly. Quote Link to comment Share on other sites More sharing options...
btherl Posted April 18, 2007 Share Posted April 18, 2007 If it displays properly in webmin, then it must be something in your script.. Are you able to track the data through the php code, and print it out at each stage? That's the usual technique I use to find out why data that is fine on one end (mysql) comes out garbled on the other end (the html output). Just statements like print "{$data['item']}<br>"; or var_dump($data); echo "<br>"; The first place to check is immediately after the data comes out of mysql. If the data displays incorrectly at that point, then you know it's either the way you are accessing mysql, or it is something to do with display of the page itself. Quote Link to comment Share on other sites More sharing options...
Stik Posted April 18, 2007 Author Share Posted April 18, 2007 Thanks I'll give it a try Quote Link to comment 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.