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 6209397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:58:39+00:00 2026-05-24T05:58:39+00:00

I have a problem with mdash character (—, or Alt+0151). Thing is I have

  • 0

I have a problem with mdash character (—, or Alt+0151).

Thing is I have a page with dtd like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I also have a form (shortened version):

<form name="dep_new" action="whatever.php" method="post">
    <input class="mandatory" id="dname" type="text" name="dname" value="<?php echo $department->name; ?>"/>
</form>

It is working with PHP 5.2 and MySQL 5.1 to store value of that input.

Now, when I work with any other browse but IE and input an mdash character into this field (by typing it Alt+0151) I get a proper long dash. It saves and retrieves from database with no problem.

However when I try to save it using IE9 I get the following:

Typing: Test—Test

After save and refresh: Test—Test

In other browsers I see: Test�Test

Becasue this is a departmnet name it is being displayed on another page and the results I get are :
In IE: TestTest
Other browsers: Test[a thing I cant post here – a square with 00 and 97 in it]Test

This square thing looks like this:

----
|00|
|97|
----

However if I do the same in say FF or Chrome, it displays fine in IE page as well while in IE input it shows:

Test—Test

Any attempt to encode/decode fails.
However if I change dtd to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN>

It all works fine in all browsers…

Any thoughts?

  • 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-05-24T05:58:39+00:00Added an answer on May 24, 2026 at 5:58 am

    There is no Em-dash in standard Ascii table or ISO 8859-1 character set, it is available in Windows-1252 charset as 0x97 but this is a windows only standard. It is also available as unicode character U+2014 so you’d better use UTF-8 encoding for your pages if you want to safely use em-dash. add this to your <head>:

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have problem with ActionLink. I'd like to pass to my ActionLink parameter for
I have problem with cakephp's Session->write method. If I set a value like $_SESSION['..']
I have problem with customizing each page using pagecontrol and UIScrollView. I'm customizing Page
I have problem with Activities navigation, searching works good. Activities hierarchy looks like that:
I have problem with this method in NLog library: NLog.Targets.Wrappers.AsyncTargetWrapper.ProcessPendingEvents(object state) It consume too
I have a page and a user control — we'll call them Detail.aspx and
I have problem with pointers. This is working fine - int main(void){ char *w;
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names

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.