Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to dynamically replace unreadable characters with correct ones with jQuery, JS or PHP?
    text
    copied!<p>I'm not sure it's even possible, but something tells me it may be. I'd appreciate expert guidance. </p> <p>My WordPress-based website gets bits of dynamic content from this other site ("this day in aviation" widget):</p> <p><a href="http://www.youngeagles.com/factzone/thisday.asp" rel="nofollow noreferrer">http://www.youngeagles.com/factzone/thisday.asp</a></p> <p>I embed that data into my site using this bit of code:</p> <pre><code>&lt;div id="this_day_in_history"&gt; &lt;h3&gt;This Day in Aviation History&lt;/h3&gt; &lt;script src="http://www.youngeagles.com/thisday/absolutecr.asp?z=1" type="text/javascript"&gt;&lt;/script&gt; &lt;/div&gt; </code></pre> <p>On the original site, all the characters display perfectly fine, but when they are displayed on my site, some of the quotes and a few French and Spanish characters are replaced with <code>&lt;?&gt;</code>. </p> <p>Is there a magic line of code that would allow me to fix the look of the characters on my site?</p> <p>Preferably with jQuery or JavaScript, or maybe there's a PHP solution? </p> <p>I would be grateful for your suggestions!</p> <p><strong>EDIT: the initial solution was offered as answer to this question by Adam MacDonald, but the snippet of code he generously composed needed a couple of further adjustments for my purposes. The final solution was offered by Phoenix in a separate thread:</strong> <a href="https://stackoverflow.com/questions/6336409/a-bit-of-php-code-wipes-out-wordpress-site">A bit of PHP code wipes out WordPress site</a> </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