<---- What?

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
Yanayaya
Forum Commoner
Posts: 42
Joined: Tue Dec 02, 2008 7:49 am

 <---- What?

Post by Yanayaya »

Hello Guys,

I have come across an issue I have never seen before, perhaps someone can shed some light on what is causing this.
I have a web form that requires the entry of a currency value (i.e. £10) however when you type a currency in including the "£" symbol, the data that gets imput into mySql is "£10".

Where is the "Â" coming from as it is being displayed on my database pulls? Any ideas? :crazy:
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Â <---- What?

Post by requinix »

It's an encoding issue. Something is sending data in ISO-8859 format and another is expecting it in UTF-8 format. Like a Spaniard and an Iraqi: nobody understands each other.

I prefer UTF-8 for everything simply out of preference. Just make sure that the HTML page with the form, database table, and the HTML page that shows the data all use the same encoding/collation.
Take a look near the bottom of this article ("Working with UTF-8 on the Web") for hints and ideas.
Yanayaya
Forum Commoner
Posts: 42
Joined: Tue Dec 02, 2008 7:49 am

Re: Â <---- What?

Post by Yanayaya »

What an excellent article, thank you very much for the link. Problem has been resolved. :)
Post Reply