Note that there are some explanatory texts on larger screens.

plurals
  1. POBlack Diamond With White Question Mark
    text
    copied!<p>I'm using this code: </p> <pre><code>$("#myDiv").load("getTweet.php?tweet_id="+tweet_id+"&amp;yes="+yes+"&amp;no="+no); </code></pre> <p>to call for a tweet, which is then delivered, but in the place of single quotation marks, I get black diamonds with a white question mark.</p> <p>I have tried using </p> <pre><code>htmlspecialchars($tweet,ENT_QUOTES,"UTF-8")` and `mb_convert_encoding($tweet, "HTML-ENTITIES", "UTF-8"); </code></pre> <p>before sending the tweet, but that didn't do anything. And besides, when I just go to "getTweet.php", the quotes are display just fine. But when I try to load them through ajax, they somehow get converted into something that can't be displayed.</p> <p>Another thing that seems weird to me is that sometimes the quotes are displayed fine, but other times, they show up as black boxes.</p> <p>I've also tried </p> <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt; </code></pre> <p>and</p> <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt; </code></pre> <p>What's weird is sometimes they work, and sometimes they don't. Also, sometimes one works, and the other doesn't.</p> <p>Sometimes I just have to have neither of them on, and it is displayed correctly.</p> <p>I should also mention, I got all of my data from twitter, and at the top of their site, they have <code>&lt;meta charset="utf-8"&gt;</code> and <code>&lt;!DOCTYPE html&gt;</code>, which I have too.</p> <p>So if anyone could shed some light on this, I would greatly appreciate it! Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload