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

  • Home
  • SEARCH
  • 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 6124061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:05:21+00:00 2026-05-23T16:05:21+00:00

P.S.: It is not a duplicated question, because I’m not looking to write contents

  • 0

P.S.: It is not a duplicated question, because I’m not looking to write contents in a file because it is already done, I’m looking to change a type of a file to be UTF-8, there is a difference in it.

How to generate the UTF-8 file and not ANSI. (Is not the contents).

For example, the most IDE have an option encoding, where you are able to modify the type of your file, but I’m generating a bulk from my database, and it generates a lot of individual text files, but the whole files is ANSI default.. I’m just looking for a function in php that make it possible to change the encoding before it generates the bulk.

If the source code help I can post it here. just let me know.

Thanks in advance.

EDITED

Follow a print of what I’m asking here.

enter image description here

When I generate the file “testecli01.csv” it always get encoding ANSI, whatever I do in my script it is always ANSI, and I need in UTF-8, just this. Is simple but I have no idea how to do.

  • 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-23T16:05:22+00:00Added an answer on May 23, 2026 at 4:05 pm

    If your 3rd party program "do not support files in ANSI but UTF-8" as you mentioned in a comment then most likely it’s expecting a BOM.

    While the Unicode Standard does allow a BOM in UTF-8,[2] it does not
    require or recommend it.[3] Byte order has no meaning in UTF-8[4] so a
    BOM serves only to identify a text stream or file as UTF-8.

    The reason
    the BOM is recommended against is that it defeats the ASCII
    back-compatibility that is part of UTF-8’s design.

    So strictly speaking your 3rd party program isn’t completely compliant with the standard because the BOM should be optional. ANSI is 100% valid UTF-8 and that is one of the main drivers of it. Anything that can understand UTF-8 accordng to the standard by definition also understands ANSI.

    Try writing "\xEF\xBB\xBF" to the front of the file and see if that solves your problem.

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

Sidebar

Related Questions

I've look all previous questions, and I know that my question is not duplicated.
This question is about removing sequences from an array, not duplicates in the strict
Duplicate of this question . update - This is not an exact duplicate. See
Not sure if this is possible or if I'm expressing correctly what I'm looking
I have a quick question, because my brain refuses to think this evening. HTML
Is there a way to test if a collection is already initialized? try-catch only?
I am not sure if this is a duplicate question to this one mainly
This is not a duplicate of this question . I have to serialize the
I know this is possible duplicated question. Ruby, Generate a random hex color My
I previously asked the question and got answer to Best approach to write query

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.