Jump to content

Unable to display "Hexed" characters correctly


Stik

Recommended Posts

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.

 

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.