Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

encoding - php remove/identify this symbol ?

EDIT:

Ok I have some data (A ton of data) being pulled from a MySQL DB Table, nothing special about how the data is entered. When parsing the data and re-displaying it to Firefox this symbol ? shows up. When I compare it to the DB entry it looks like a space (Nothing special). I'm using all the default PHP/MySQL settings.

Doing a var_dump or print_r is no help either.

Any thoughts?

The Symbol: ?

UPDATE:

Ok I did find the character that is causing the problem

Not to be confused with

-

(The Hyphen).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The character ? is the REPLACEMENT CHARACTER (U+FFFD). It is used when there was an error within an UTF code:

FFFD ? REPLACEMENT CHARACTER

  • used to replace an incoming character whose value is unknown or unrepresentable in Unicode

In most cases it means that some data is interpreted with an UTF encoding while the data is not encoded with that encoding but a different one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...