DarkPrince2005 Posted March 16, 2010 Share Posted March 16, 2010 Greetings all I'm using Joomla with the Joomfish component for the translations and returning some of the translations using a custom php script. the site displays correctly but what I'm retreavingand displaying as weirdd question marks in it. I know it's to do with the charset but how can I alter the retrieved charset without actually altering anything in the database content or structure. I tried mysql_set_charset($link,utf8) but it seemed to alter and change the database. any suggestions? Link to comment https://forums.phpfreaks.com/topic/195403-funny-question-marks-in-content/ Share on other sites More sharing options...
Rustywolf Posted March 16, 2010 Share Posted March 16, 2010 is it a black diamond with a question mark? its added when a script tries to add an invalid character. if it happens all the time, id suggest $value = substr($value, 0, -1) to remove the last character Link to comment https://forums.phpfreaks.com/topic/195403-funny-question-marks-in-content/#findComment-1026828 Share on other sites More sharing options...
DarkPrince2005 Posted March 16, 2010 Author Share Posted March 16, 2010 Yes it's a black diamond with a question mark. Could you please explain a bit more what exactly your suggested script does. Link to comment https://forums.phpfreaks.com/topic/195403-funny-question-marks-in-content/#findComment-1026830 Share on other sites More sharing options...
Rustywolf Posted March 16, 2010 Share Posted March 16, 2010 It cuts the last digit off a string. http://php.net/manual/en/function.substr.php Link to comment https://forums.phpfreaks.com/topic/195403-funny-question-marks-in-content/#findComment-1026837 Share on other sites More sharing options...
DarkPrince2005 Posted March 16, 2010 Author Share Posted March 16, 2010 The problem is that I actually need to display the characters. Link to comment https://forums.phpfreaks.com/topic/195403-funny-question-marks-in-content/#findComment-1026850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.