/    Sign up×
Community /Pin to ProfileBookmark

What causes phantom charaters?

I have looked all through the code and cannot find what causes this:

[canned-message]attachments-removed-during-migration[/canned-message]

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 07.2016 — Not all parts of your application are talking in the same character set, most likely. This can include your DB connection, the headers you're sending with the output to the browser, optional arguments to things like htmlentities(), and so forth.
Copy linkTweet thisAlerts:
@anothenauthorApr 07.2016 — aha, that may be it.

I've had trouble with select * from the table where date = $date.

I got it to work when I used : "$date"

I haven't seen these phantom characters until after I made the change.
Copy linkTweet thisAlerts:
@anothenauthorApr 07.2016 — nope,that's not it, I'll have to start taking the code apart piece by piece.

I'll start by checking headers
Copy linkTweet thisAlerts:
@NogDogApr 07.2016 — Wanted to post this link with my earlier reply, but it turns out my blog died after a recent WordPress update. Got it back up in a rudimentary form, so ignore the blah appearance (now a work in progress again). ?

http://www.ebookworm.us/utf8-in-php-and-mysql/

(has some suggestions on making sure you're using UTF8 character set in all places)
×

Success!

Help @anothen 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 5.21,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...