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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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