We help IT Professionals succeed at work.

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

Xerc asked
Medium Priority
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?
Watch Question

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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.