Reputation: 599
My php Sql is inserting  with £ like "£" in a Database field ITEM_NAME. Actully this is an Iphone Application and I am using this ITEM_NAME for comparing values. I dont want to add  with £. I have utf8_general_ci in database for this field.
I gone through almost all the post related to that. Can any body please help me about this ?
I apologize for less explaination. I want to know can i insert £ into database without having Â. Actully once it enters in the database as £ and then it causes comparison problems.
Upvotes: 2
Views: 672
Reputation: 30252
You have to enforce utf-8 in several places:
Upvotes: 2
Reputation: 41050
Run SET NAMES "utf8"
before your query or set it in my.cnf as default-character-set=utf8
.
Upvotes: 0
Reputation: 44969
Use mysqli_set_charset() before every query (or mysql_set_charset()) and ensure that your data itself is in unicode, too.
Upvotes: 0
Reputation: 4445
The database is utf8_general_ci as the field?
Have you tried the function utf8_decode
I've a similar problem with CakePhp and I've to set the encoding in the Database file configuration...
Upvotes: 0