www.webdeveloper.com
Results 1 to 2 of 2

Thread: Long Dash Displays as Question Mark/Won't Encode

  1. #1
    Join Date
    Jan 2003
    Posts
    220

    Question Special Characters Display as Question Mark/Won't Encode

    I'm stumped. I've tried everything. I have some MySQL entries that include special characters like long dashes (–) and letters with tildes. They display as question mark icons when I output the entries on the website like this:

    Code:
    print "<p>" . preg_replace("/(\015\012)|(\015)|(\012)/", "<br />", $row['itemNotes']) . "</p>\n";
    The website is set up with UTF-8 encoding. The database fields are all set up as latin1.

    Any recommendations? I must be overlooking something here.

    Thank you for your help.
    Last edited by msmith29063; 12-30-2013 at 03:49 AM.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,537
    Here's what I know about the issue: UTF-8 in PHP and MySQL.

    Hope it helps.
    Last edited by NogDog; 12-30-2013 at 04:40 PM.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles