Jump to content

[SOLVED] UK Pound CharSet


MadTechie

Recommended Posts

I have a slight problem where whenever i enter a UK Pound Sign into the database it seams to convert to a  £, i have no idea why the  is appearing i assume its the charset which is 'utf8_general_ci' has anyone come across this before ?

 

anyideas how i can resolve it ?

 

 

Link to comment
https://forums.phpfreaks.com/topic/45902-solved-uk-pound-charset/
Share on other sites

I am storing data into the database, but when i pull the date back all the £ convet to £,

i have view'd the data in the database via phpMyAdmin and they are being stored as £,

 

i have also trid converting £ to '£' but then the database stores the data as "£"

 

what i want, is for the data to be stored without the 'Â'

 

if i do the following in phpMyAdmin

UPDATE `myTable` SET `myField` = '£1.99';

all is fine..

 

also

UPDATE `myTable` SET `myField` = '£1.99';

 

all works well FROM phpMyAdmin,

 

But if i perform the exact same SQL statement from my own php program it updates to '£1.99' or '£1.99'

 

the reason i believe its a SQL problem rather than a PHP problem is because i had this exact same problem a few weeks ago when i move my code to another server.

 

the thing thats the biggest pain is after the move i fixed it by changing the charset from 'latin1_swedish_ci' to 'utf8_general_ci' <-- it think,

 

i hope that makes sense..

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.