How do I figure out a special character used in a console, when processed with PHP and displayed in browser?

Posted on 2009-02-09
Last Modified: 2012-05-06
I'm using PHP to interface with a legacy console program (not PHP).  No big worries doing so.  What is weird, however, is when I use the console directly, there is what appears to be a double space when I execute a command and get a specific response.  No worries.  When I try to display the console dialog in a web browser however, by reading lines from the console, this double space shows up as a black diamond with a white question mark.  All other characters display just fine, so I'm not sure what particularly to do.  Do I need to process the text in a UTF8 or similar format?  Or alternatively, how does one go about determining the hex equivalent of the special character?
Question by:Xerc
    1 Comment
    LVL 2

    Accepted Solution

    This diamond with a question mark is a unrecognised character to HTML Use php  htmlspecialchars($output) where $output is the text you wish to display in html.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    A colleague recently asked me about how to give his client a small part of the web site that could be completely under the client's control.  Since I have done this sort of thing before to add emergency banners to a web site, I decided I would creat…
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    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…
    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.

    760 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

    8 Experts available now in Live!

    Get 1:1 Help Now