Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

php - Squares apperaing in text, want to search & replace

I have a site where a client has inserted text. Probably by copying it from a PDF or Word document. There is a strange character that appears at random places in the inserted text. The site is full of them so i would like to get rid of them programmatically, either by a search and replace in the database or by filtering via PHP when the value is printed out via str_replace();

The character looks like this, and is not recognized when i search for it in the database, and not even when you search for it with the built in browser search function.

enter image description here

It looks the same in the database as it does when rendered. In some cases it′s like an empty square, in some cases with a questionmark inside it.

I have tried this without luck:

$value = str_replace( '', '',  $value );

(The square in first argument seems to be removed when i save)


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

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...