• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

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

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?
1 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.

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now