php


why unknown charactor added to value in mysql table when trying to insert a value in Pound (£9000)


When I'm trying add a value in Pound to my table in mysql (eg: £9000),
In the table field shows like £9000.
I tried by changing the Collation value to utf8_unicode_ci.
But the result is same an extra character is added to field.
Is there any method to remove it.
Thanks in advance
The connection between your php instance and the mysql server has a character set associated to it. The mysql server expects the data send by your php script to be encoded in that charset. Apparently your php script sends utf-8 encoded data while the server expects something like iso-8859 (or similar) and hence interprets the two bytes coding for £ in utf-8 as two separate characters.
You should change the connection charset to utf-8, e.g. by using php >= 5.3.6, pdo and charset=utf8 appended to the dns.
see http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
and http://docs.php.net/ref.pdo-mysql.connection

Related Links

transfer file from path to path in ftp using php
Multiple shell commands via php
Finding latest message from table, grouped by user in mysql
CentOS ODBC MSSQL + codeigniter cannot perform query
combine two foreach statements( image& text)
Phalcon database migration revert/rollback
Android JSON Problems
How to get values from one form to another
SQL php on different pages to Insert (mysqli)
Phalcon Model find() with condition in another table
OpenCart 2.0.1.1 updates done orders with currency rate
How php to open, read, transfer to mysql database very line by line content
Count rows for each distinct city
How to using php to get unique word pair(string) and insert into mysql table
Codeigniter Non-static method MY_Loader::define_module() should not be called statically
Project layout with vagrant, docker and git

Categories

HOME
elasticsearch
flask
azure-functions
postgresql-9.4
selenium-builder
embedded-resource
adobe
openfoam
repair
ui-automation
cocotb
watch-os-3
vimeo
orc
mpu6050
django-rq
asp.net-core-1.0
scala-ide
pickle
xsl-fo
pfobject
spring-ldap
unity-container
anova
uislider
intel
eclipse-emf
sipp
opentext
android-cardview
ninject
copy-protection
envoy
nic
tilemill
dotcms
location-services
vcenter
nsmutablearray
restful-architecture
aurelia-cli
strapi
export-to-pdf
hdiv
permission-denied
zend-form
daz3d
jenkins-slave
realstudio
webalizer
punctuation
emacs25
dynamics-crm-4
http4s
petsc
allegro
qtextedit
yui3
libharu
visual-studio-monaco
conan
cdo.message
android-syncadapter
uibinder
android-async-http
mnesia
psd
diawi
nette
directx-9
asp.net-web-api-helppages
360-degrees
tree-structure
gflags
htmltidy
adwords-apiv201402
osascript
category-theory
communicate
neo4jphp
cpu-time
roxy-fileman
pbkdf2
ggts
boinc
jquery-lazyload
django-filebrowser
dojo-1.9
background-repeat
dynamic-c
nosetests
css-friendly
ognl
bll
aptitude
ninject-interception
getimagesize
ntruencrypt
version-control-migration

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile