/    Sign up×
Community /Pin to ProfileBookmark

weird characters between php and mysql

Hi Guys:

I’m getting some weird characters between mysql and php, specifically whenever i use a £ (pound sign) is adds an accented A before it. also sometimes before ? (question marks) it adds in an accented A and another ?, so it looks like this:

Ã??

and for pound signs its sometimes:

£18.00

I guess its a character encoding problem, my page uses utf-8, i have set the encoding on the tables in mysql to utf-8 also.

i just tried to update a field that had £18.00 and it turned out like:

£18.00 (after updating it twice)

any help is appreciated

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@Suhas_DhokeMay 10.2007 — I think, Its the problem of [B]Encoding[/B].

When you try to copy/paste the symbol in your file (in editor), then set the encoding to [B]cp 1252[/B].

And when u insert it in MySQL, store its html entity, instead of the symbol as it is.
×

Success!

Help @Sid3335 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...