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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:51:09+00:00 2026-05-23T00:51:09+00:00

I’m not sure it’s even possible, but something tells me it may be. I’d

  • 0

I’m not sure it’s even possible, but something tells me it may be. I’d appreciate expert guidance.

My WordPress-based website gets bits of dynamic content from this other site (“this day in aviation” widget):

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

I embed that data into my site using this 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>

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 <?>.

Is there a magic line of code that would allow me to fix the look of the characters on my site?

Preferably with jQuery or JavaScript, or maybe there’s a PHP solution?

I would be grateful for your suggestions!

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: A bit of PHP code wipes out WordPress site

  • 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-23T00:51:10+00:00Added an answer on May 23, 2026 at 12:51 am

    I find using iconv works the best in php .. something like:

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

    It attempts to match the character to the best of its ability, and if not, drops it

    Also, utf8_encode/decode sometimes works fine.

    EDIT:

    perhaps something like 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 in case you want to see the changes in place of your current 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>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have a text area in my form which accepts all possible characters from

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.