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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:44:54+00:00 2026-05-26T05:44:54+00:00

Good day, I’m trying to convert my site from ANSI-encoded PHP files to UTF-8.

  • 0

Good day,

I’m trying to convert my site from ANSI-encoded PHP files to UTF-8. I converted my header.php and footer.php files to UTF-8 but when I convert my index.php, the page renders incorrectly.

index.php encoded in ANSI:

<?php
include 'header.php';
echo '<h1>ANSI</h1>';
include 'footer.php';
?>

Outputs: http://www.quimp.com/gce/ansi.jpg


index.php encoded in UTF-8: (converted from notepad++)

<?php
header('Content-Type: text/html; charset=utf-8');

include 'header.php';
echo '<h1>UTF-8</h1>';
include 'footer.php';
?>

Outputs: http://www.quimp.com/gce/utf8.jpg

When I check the source of the page, the output seems correct (the < head > content is where it should be). However, if I copy the source code of the UTF-8 version from the browser and paste it in notepad++, some characters are prepended. They look like a line-break and an accent on the “<“:

<!DOCTYPE html> // htmlentities() output

%0A%EF%BB%BF%3C%21DOCTYPE+html%3E%0A // urlencode() output

After removing these characters, the page renders properly. The site is http://www.quimp.com. The content of header.php can be found here: quimp.com/gce/header.txt

I searched a ton but couldn’t find a similar problem. Any idea what might cause this?

Thanks a lot for your time! -Ben

  • 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-26T05:44:54+00:00Added an answer on May 26, 2026 at 5:44 am

    It’s a BOM (byte order mark).

    UTF-16BE and UTF-16LE files (big-endian and little-endian) often start with a BOM (Unicode character 0xFEFF) so you can detect the endianness of the file.

    UTF-8 doesn’t have this issue, but some converters insert a BOM anyway. This will show up as 3 bytes as the beginning of the file, the UTF-8 representation of 0xFEFF.

    You didn’t say how you’re doing the conversion. Whatever tool you’re using, see if you can find out how to tell it not to insert the BOM, or find a different tool.

    EDIT: Confirmed, I just took a look at http://quimp.com/gce/header.txt, and it’s a UTF-8-encoded file starting with an FEFF character.

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

Sidebar

Related Questions

Good day! I'm trying to implement drop down menu from examples on my site.
Good day, I'm trying some examples to classify text from the NLTK cookbook and
Good day, I have a question here. I am trying to fetch image from
Good Day All we are trying to do is inside a trigger make sure
Good day, I receive data from a communication channel and display it. Parallel, I
Good day. In my Drupal site, strange characters appear in text. Like, instead of
Good day! I want to add and remove CSS files according to the size
Good day, I am having an issue trying to get the Text on a
Good day. I'm trying to filter logs with get-winevent. When I working with local
Good day! I've a model that is binded from JSON request, say like this:

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.