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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:48:53+00:00 2026-05-13T23:48:53+00:00

I have a file UTF-8 encoding in windows, and when i use it under

  • 0

I have a file UTF-8 encoding in windows, and when i use it under windows it shows everithing right, but when i copy the file in Linux, the Unicode characters are giberish. The file is plain textfile. How can i get this file to be readable in linux, or how can i copy it properly??

thanks in advance

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

    Looks like an Apache/PHP issue

    Are you running your strings through PHP’s built-in htmlspecialchars method (or similar)? If so, you may need to switch its encoding to UTF8

    Instead of htmlspecialchars($mytext), try using htmlspecialchars($mytext, ENT_COMPAT, 'UTF-8')


    Note the following (my previous answer) is incorrect, as Michael Burr notes, UTF-8 doesn’t need or use the BOM.

    If it’s just the text, then there’s a chance it’s missing the Byte Order Mark (BOM), or is encoded with an incorrect BOM.

    If it’s incorrect, the linux reader may be honouring it but your windows reader is ignoring it. Try re-opening your file in something like Notepad++ and resaving. Notepad++ has a bunch of options in the Format menu about saving UTF-8 files.

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

Sidebar

Related Questions

I have a file which is mostly UTF-8, but some Windows-1252 characters have also
I am experiencing some problem on UTF-8 Encoding. I have a CSV file and
I have an XML file that looks like <?xml version='1.0' encoding='UTF-8'?> <root> <node name=foo1
I have a Unicode file (UTF-16 FFFE little-endian BOM) which contains rows of tab-separated
I can not copy files that have Unicode characters in their names from Ruby
I have a file in UTF-8, where some lines contain the U+2028 Line Separator
I have a file, which I read from test . This file is UTF-8.
I have a file which may be in ASCII or UTF-8 format. I can
I have a json file exported from phpmyadmin, it looks like this(utf-8 file): [{user_email:
I have a text file with text that should have been interpreted as utf-8

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.