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

  • SEARCH
  • Home
  • 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 8467219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:34:46+00:00 2026-06-10T15:34:46+00:00

This is a bit of a weird one really, and probably something I haven’t

  • 0

This is a bit of a weird one really, and probably something I haven’t done correctly, but for some reason when I am inserting or updating in MySQL (using a PHP Class to create), for some reason the text being inserted (an HTML copy of an email in this case) is only half inserted … it keeps breaking when it sees ‘–’

I do not think this is a standard hyphen since it looks ever so slightly different in the browser bar and even in this text area my hyphen ‘-‘ is narrower than ‘–’. I’ve tried HTML Entities, but will not convert, so an suggestions when dealing with this troublesome character?

Though I should probably say, if I use PHP My Admin to directly insert the HTML body (exactly the same formatting, everything gets inserted. I’ve even tried str_replace to remove it with no luck. I’ve also replaced words with a lot more words but that worked (yet it still cut off before that character showed…..

  • 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-10T15:34:47+00:00Added an answer on June 10, 2026 at 3:34 pm

    You are using a “dash” not to be confused with a hyphen. Look at the difference: – –

    There are many kinds of dashes:

    figure dash    (‒)  U+2012              
    en dash        (–)  U+2013
    em dash        (—)  U+2014  
    horizontal bar (―)  U+2015
    swung dash     (⁓)  U+2053
    

    You can try to str_replace("–", "-", $query); for each type before executing the query and see if that solves your problem, but really you should look into possibly doing a utf8_encode() and then setting your database field to use UTF8.

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

Sidebar

Related Questions

This might seem a bit weird, but since I am new in RoR and
This is a bit of a weird request but I am trying to set
Um, this might sound a bit weird. We were having some problems with a
This is a bit of a weird desire but I am making a matching
I'm experiencing some really weird object behaviours at the moment. I have this template
Okay, this one seems to me a bit weird. Any help would be greatly
This is a bit of a weird one. I'm using HTTPClient 4.1.2, and it
Bit of a weird one this. I'm rendering datasets on a map and need
Okay this may sound a bit weird but it is what I have to
This is a really weird one and I'm wondering if I need to change

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.