PHP character encoding help

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
jake2891
Forum Newbie
Posts: 2
Joined: Fri Jun 13, 2008 4:32 am

PHP character encoding help

Post by jake2891 »

Hi guys,

I have a text area which i populate with some data save it to the database. The problem is if i put 570£ when i use the pound symbol
it inserts strange characters into the databse. Anyone know why this would be happening as I am using iso-8859-1 as my forms charset and in the database itsself which im using Navicat im using the westEuropean character set. Here is the symbol its putting in 570£. Could this be a coding problem?
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: PHP character encoding help

Post by WebbieDave »

Track down where the strange translation is occurring. Is Navicat converting it that way? Is it being converted when displayed back to you. If so, it could be a web server charset problem or a browser problem. Try a manual SQL INSERT using the db's native client to see if the problem occurs that way.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP character encoding help

Post by RobertGonzalez »

Remember that Navicat is a MySQL client interface, not the database itself. What is the collation on the table?
Post Reply