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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:16:35+00:00 2026-06-10T00:16:35+00:00

Can I use echo to generate an UTF-8 text file? For example if I

  • 0

Can I use echo to generate an UTF-8 text file?
For example if I want to generate a file that contains the character ę:

echo "abcd ę" > out.txt

(the batch file is encoded with UTF-8)

the result is an ANSI encoded file and the ę character is transformed into ê.
How can I convince echo to generate an UTF-8 file?

If it’s not possible, then can I change the encoding of the text file after creating it?
Is there any tool in the gnuwin32 package that can help me to change the encoding?

thanks

  • 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-06-10T00:16:37+00:00Added an answer on June 10, 2026 at 12:16 am

    The problem was that the file contained the line:

    <META content="text/html; charset=iso-8859-2" http-equiv=Content-Type> 
    

    and then Notepad2 and Firefox was changing the charset, showing Ä instead of ę. In plain Notepad, the file looks ok.
    The solution was to add the UTF-8 signature (Byte Order Mark) at the beginning of the file:

    echo1 -ne \xEF\xBB\xBF > out.htm
    

    (echo1 is from gnuwin32)

    thanks for the answers

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

Sidebar

Related Questions

I can use this maven plugin maven-jaxb-plugin to generate Java Classes from XSD file.
I want to generate unique and random numbers or IDs which I can use
I can use stat() to figure out what permissions the owner, group, or others
I can use ipcs(1) to list out the active shared memory objects on a
I use Excel Writer of Harish Chauhan to generate an excel (xls) file. Then
I can't figure this out. How do you use the url helper with custom
Is it possible to get/import/generate $values based on file names? For example, if the
What i want : Generate jar file with apps version in name, Ex :
I use md5sum to generate a hash value for a file. But I only
I can use the following to get the contents of a folder with no

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.