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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:28:28+00:00 2026-06-02T01:28:28+00:00

I got a problem with the encoding of a text file. If I open

  • 0

I got a problem with the encoding of a text file.

If I open it with *nix terminal tools like less, cat or more, accented characters are shown correctly.
But if I open it with any editor (e.g. vim), accented characters are scrambled.

My terminal locale is set tu UTF-8, my editor (vim) has his default encoding set to UTF-8. If I open textfile.txt with vim I see scrambled accents either I set vim encoding to UTF-8 or ISO8859-1.

The output of the file utility is:

$ file textfile.txt
textfile.txt: ISO-8859 English text, with very long lines

I already tried the following with iconv:

iconv -f iso-8859-1 -t utf-8 textfile.txt > textfile.utf8.txt

I get this

$ file textfile.utf8.txt
textfile.utf8.txt: UTF-8 Unicode English text, with very long lines

Opening it with vim keeps showing scrambled accents, and this time accents are scrambled even if I use cat or more.

My goal is to get this file in UTF-8 format and, obviously, showing correctly the accented characters.

[The brute way to do this is to copy every single output screen of the command “more”, and paste it into an editor. There must be a smarter way to do this.]

Thanks for any help.

  • 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-02T01:28:30+00:00Added an answer on June 2, 2026 at 1:28 am

    It turned out that the file contained characters from two different encodings, that’s why visualizations were so scrambled in every case, and iconv didn’t manage to successfully convert the file. Thanks everyone anyway

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

Sidebar

Related Questions

Ive got text file with utf-8 encoding with more then 2k lines of insert
I've got XML feed from public google calendar. Looks like this: <?xml version='1.0' encoding='UTF-8'?>
I've got a problem with following example code in flex: Test.mxml: <?xml version=1.0 encoding=utf-8?>
My problem is I got following encoding error while copying data from csv files
I've got a problem to make two applications to send text-data between themselves. The
I've got a largish dataset of German text which was generated with some encoding
I was trying to perform a SQL statement and got some problems with encoding.
i got problem with my code and hopefully someone able to figure it out.
I got problem with sending data in Android using httpPost. I found some example,
I've got problem with connecting to MySQL database on my freshly installed Windows 7

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.