Jump to content

Currency symbols


ale1981

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

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.