how to remove junk characters?

Posted on 2006-05-23
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

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

    LVL 8

    Accepted Solution

    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

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Question to locate the problem 18 26
    json value get in input box 6 27
    Php Sql Query 7 19
    MySQL - Limit or Top Records 15 21
    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    The viewer will learn how to count occurrences of each item in an array.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now