I am unsure it's even possible, but something informs me it might be. I'd appreciate expert guidance.

My WordPress-based website will get items of dynamic content out of this other site ("this very day in aviation" widget):

http://www.youngeagles.com/factzone/thisday.asp

I embed that data into my website by using this little bit of code:

<div id="this_day_in_history">
<h3>This Day in Aviation History</h3>

<script src="http://www.youngeagles.com/thisday/absolutecr.asp?z=1" type="text/javascript"></script>

</div>

Around the original site, all of the figures display perfectly fine, but when they're shown on my website, a few of the quotes along with a couple of French and The spanish language figures are changed with <?>.

It is possible to miracle type of code that will let me fix the feel of the figures on my small site?

Ideally with jQuery or JavaScript, or possibly there is a PHP solution?

I'd be thankful for your suggestions!

EDIT: the first solution was offered as response to this by Adam MacDonald, however the snippet of code he generously composed needed a few further changes for my reasons. The ultimate solution was provided by Phoenix inside a separate thread: A bit of PHP code wipes out WordPress site.

I've found using iconv works the very best in php .. something similar to:

iconv("UTF-8", "ISO-8859-1//IGNORE//TRANSLIT", $str)

It tries to match the smoothness to the very best of its ability, and when not, drops it

Also, utf8_scribe/decode sometimes works fine.

EDIT:

possibly something similar to this ...

    <?php
    $contents=file_get_contents('http://www.youngeagles.com/thisday/absolutecr.asp?z=1');
    $convertedcontents=iconv("UTF-8", "ISO-8859-1//IGNORE//TRANSLIT", $contents);
    echo "<script type=\"text/javascript\">".$convertedcontents."</script>";
    ?>

EDIT 2: just just in case you need to begin to see the changes instead of your present code:

    <div id="this_day_in_history">
    <h3>This Day in Aviation History</h3>
    <?php
    $contents=file_get_contents('http://www.youngeagles.com/thisday/absolutecr.asp?z=1');
    $convertedcontents=iconv("UTF-8", "ISO-8859-1//IGNORE//TRANSLIT", $contents);
    echo "<script type=\"text/javascript\">".$convertedcontents."</script>";
    ?>
    </div>

The issue is probably because of incompatible encoding utilized by your website and also the site you are receiving the information from. It may be the widget will get the information and does an UTF8 encodeing/decoding onto it. Things I would do is most likely to set up firebug, look into the data came back. I Quickly would edit the widget code and give a utf8_encode() or perhaps a utf8_decode()around the response when needed.

edit: Also, make sure that there does not exist a flag you are able to send whenever you request the information that signifies the encoding you would like the solution in. I've come across this used before enabling you to tell the plan to return the information in UTF8 or otherwise.