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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:17:25+00:00 2026-05-17T23:17:25+00:00

I have a PHP file which has the following text: <div class=small_italic>This is what

  • 0

I have a PHP file which has the following text:

<div class="small_italic">This is what you´ll use</div>

On one server, it appears as:

This is what you´ll use

And on another, as:

This is what you�ll use

Why would there be a difference and what can I do to make it appear properly (as an apostrophe)?


Note to all (for future reference)

I implemented Gordon’s / Gumbo’s suggestion, except I implemented it on a server level rather than the application level. Note that (a) I had to restart the Apache server and more importantly, (b) I had to replace the existing “bad data” with the corrected data in the right encoding.

/etc/php.ini

default_charset = “iso-8859-1”

  • 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-17T23:17:26+00:00Added an answer on May 17, 2026 at 11:17 pm

    You have to make sure the content is served with the proper character set:

    Either send the content with a header that includes

    <?php header("Content-Type: text/html; charset=[your charset]"); ?>
    

    or – if the HTTP charset headers don’t exist – insert a <META> element into the <head>:

    <meta http-equiv="Content-Type" content="text/html; charset=[your charset]" />
    

    Like the attribute name suggests, http-equiv is the equivalent of an HTTP response header and user agents should use them in case the corresponding HTTP headers are not set.

    Like Hannes already suggested in the comments to the question, you can look at the headers returned by your webserver to see which encoding it serves. There is likely a discrepancy between the two servers. So change the [your charset] part above to that of the “working” server.

    For a more elaborate explanation about the why, see Gumbo’s answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an index.php file which has to process many different file types. How
This is driving me crazy. I have this one php file on a test
I have a php file which I will be using as exclusively as an
I have a PHP file, Test.php, and it has two functions: <?php echo displayInfo();
i have a php file launching my exe. the exe does cout and the
I have a PHP file and an image in the same directory. How could
In php I have open a .php file and want to evaluate certain lines.
As many do I have a config.php file in the root of a web
I have written jQuery code, in files Main.html and ajax.php . The ajax.php file
Alright, currently I have my SWF hitting a php file that will go and

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.