Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


how to remove junk characters?

Posted on 2006-05-23
Medium Priority
Last Modified: 2009-12-16
i am getting junk characters like •, “, †while reading text from mysql database. how do i remove this.
Question by:jessi_vs
LVL 49

Expert Comment

ID: 16740280
You can try using htmlentitites while displaying your mysql content. Otherwise use preg_replace for filtering out characters possibly.


Accepted Solution

KennyTM earned 200 total points
ID: 16740611
I think these are UTF-8 data encoded in Latin-1.
In UTF-8, • is a bullet (•) and “ is an open quotation mark (“), and I think this makes sense...

Try to play with utf8_encode() and utf8_decode() and see whether junk characters disappear or not.

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question