Server can't display pound signs?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AimsB
Forum Newbie
Posts: 12
Joined: Thu Jul 08, 2004 9:39 am
Location: UK

Server can't display pound signs?

Post by AimsB »

We're just moving an existing e-commerce site onto a new dedicated Linux server. We have discovered that pound signs will not display, they are showing as "?" instead. We have encountered this problem once before and simply changed the occurrences of the pound sign to the ASCII equivalent. But this solution really isn't practical on an e-commerce site because of the amount of things we would have to change! Has anyone else had this problem? What can I do to get around this? Is there something wrong with the MIME types on the server or something?!

Thanks!
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

I'd imagine most e-commerce sites would have some sort of currency converstion tool, where the currency actively being used can be switched so calculations can be made in different currencies.

Well if you aren't planning on adding a feature that extensive, how about making a new global config variable. Then use something like Dreamweaver's Find and Replace feature to search every file within the site, and replace it with the new code for refering to the global variable.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

tried this?

Code: Select all

£
AimsB
Forum Newbie
Posts: 12
Joined: Thu Jul 08, 2004 9:39 am
Location: UK

Post by AimsB »

Thanks for those suggestions, but I was really hoping to work out why pound signs won't show and if there is anything I can do to fix that, instead of finding a "work around". This issue could come up with alot of our sites in the future and it would be better if we knew how to fix it on the server, if that is possible. Are there some sort of new settings in the latest server builds? Or some new Apache or PHP configuration that means pounds aren't recognised?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'd definitely suggest not using the pound symbol directly (the ASCII character) ... browser's aren't guaranteed to render that text right, ever, since it's heavily dependant on the character sets of both the page, and the browser's support.. I would suggest using entities like £ where ever possible, since these are actually in the standards..
mikeb
Forum Commoner
Posts: 60
Joined: Tue Jul 08, 2003 4:37 pm
Location: Dublin, Ireland

Post by mikeb »

What e-commerce package are you using (if any?). Usually, you can choose what symbol you wish to use for currency in an admin backend. I think the previous poster might still be on to something with the £ idea as it might not be the server, but the clients which is having a problem.

May either be the keyboard setting on your server. It might be using 'shift 3' as a hash sign (pound in the US).

cheers,

Mike
AimsB
Forum Newbie
Posts: 12
Joined: Thu Jul 08, 2004 9:39 am
Location: UK

Post by AimsB »

It's not an e-commerce package, we're a web design company and have created the e-commerce site for one of our clients. Currency conversion wasn't in their specification, so that's not on the site! But if you think there is nothing on the server that can be changed to make pound signs work, then I guess I will have to replace them with the ASCII. Just a bit of a pain! I was hoping I would just be able to add a new content or mime type or something!

Thanks for all your help
Post Reply