ale1981 Posted June 25, 2007 Share Posted June 25, 2007 Hi guys, I have a problem, we use a microsoft (mssql) product at work which stores currency symbols in the database. Now when I retrieve these symbols from the database and try to echo them to the screen using php I just get a funny square box symbol instead of the actual currency symbol. Any idea on how I can get the symbols to show correctly? Quote Link to comment Share on other sites More sharing options...
the_oliver Posted June 25, 2007 Share Posted June 25, 2007 This is probably due to the charictor type. You can try setting: header("Content-Type: text/html; charset=utf-8"); The best option would be to replace the symbole with its HTML Code. Eg: £ becomes £ http://www.ascii.cl/htmlcodes.htm is very usefull. You can always do a search and replace as data comes out of the database onto a page if needs be. Hope that helps Quote Link to comment Share on other sites More sharing options...
ale1981 Posted June 25, 2007 Author Share Posted June 25, 2007 even when I print_r($row) straight from the db without formatting, the currency symbol is showing as the square box, so I cant do a replace on the symbol because its not actually == £. Quote Link to comment Share on other sites More sharing options...
the_oliver Posted June 28, 2007 Share Posted June 28, 2007 So the actual value in the database is the funny squair thing? If so you need to do the replace on the way into the database. Or find out which ASCII number the funny symbole is and do a search replace on that. Unfortunatly your likley to have to replace any entries like that (already in the database) manualy. 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.