Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8842129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:53:17+00:00 2026-06-14T10:53:17+00:00

Some text I am entering includes several up and down arrows (↑ and ↓),

  • 0

Some text I am entering includes several up and down arrows (↑ and ↓), as well as a plus/minus sign (±).

These special characters are entered as HTML ASCII: ↑ ↓ ±. On POST, the HTML is processed with htmlentities prior to being saved to the MySQL table.

$data   = htmlentities($data,ENT_QUOTES);

It is important to note that the up and down arrow symbols are not converted to black arrows. After POSTing data, then going back to edit the same text – I see the ↑ and ↓ in the HTML source code. Only the ± is converted to the black question mark.

Checking the saved text in MySQL confirms that all three symbols are stored as follows (this after htmlentites is applied): ↑ ↓ and ±.

The PHP application then uses unhtmlentities($data) [below] to convert the entities back to symbols. This works fine with ↑ and ↓. Here is where I’m losing ±.

unhtmlentities:

function unhtmlentities ($string) {
    // Restores HTML code to inserted data
    // use when pulling from Database
    $trans_tbl = get_html_translation_table (HTML_ENTITIES);
    $trans_tbl = array_flip ($trans_tbl);
    return strtr ($string, $trans_tbl);
    // $c = unhtmlentities($a);
}

Why would this work fine for uarr and darr, but not with plusmn?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:53:18+00:00Added an answer on June 14, 2026 at 10:53 am

    If you still see &plusmn; in the source delivered to your browser, but a <?> is displayed, then it is likely your browser’s fault. Check what your Character Encoding is set to.

    edit: like mario commented, it could also simply be that that character does not exist in the font you are using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to share some text from my app to google plus and I
If am entering some values in text box it should be simultaneously displayed in
I'm working on an interactive shell where the user is entering some text, and
I am entering some random text with space and in a text box during
I have some text lines like that : vt_wildshade2^508^508 vt_ailleurs2^1188^1188 ... vt_high2^13652^13652 Is it
Was reading through some text and playing around with attempting to write past the
I have some text on a page that is small but readable in Chrome/Safari
I have some text where each line of text has some good words and
I have some text stored in the body field of a custom content type
Basically i display the some text in the MessageBox with Ok and Cancel button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.