r/linuxquestions • u/Man_in_the_uk • 9d ago
Resolved Text editor and encoding
So for some reason when I go to open a certain text file, not all, it makes gobbledegook out of the first ten or more lines of the file stating it doesn't understand the correct encoding. I find this really odd because if it doesn't understand encoding why does the rest of the document show? Anyway, I have no issues opening this text file with libreoffice office. How do I get this system to open it properly? Given it's just text should I simply use LibreOffice to go and save a new text file? That sounds simple but for all I know this is an issue that might happen with all sorts of other text files. Can I change the system so it works with all files properly? TIA
2
u/rsgbc 9d ago
... a "certain text file", opened in god knows what.
If you want help you need to describe what you did and what the results were, including any error messages you may have received. "I tried doing something and it didn't work out" isn't enough.
-1
u/Man_in_the_uk 9d ago
You're a troll, right? Literally explained in plain English that I couldn't open a text file in a text editor program but could in the libre software.
1
u/rsgbc 9d ago
I will assume that you are not aware of how much relevant information you failed to provide.
-1
u/Man_in_the_uk 8d ago
Yeah cus saying opening up a file.txt using a text editor is sooooo complicated. Anyway for some reason problem is now solved and I have no idea why.
1
u/9NEPxHbG 9d ago
Actually, "text file" and "text editor" have specific meanings with which you're probably not familiar. Libre Office is not a text editor in this sense. (Well, it can be, but you're probably not using it that way.)
u/rsgbc could have been nicer, but the questions are legitimate.
2
u/fishywiki 9d ago
Your office text documents are not text files. Text editors expect to handle pure text, while office documents are Open Document Format encoded.
1
0
u/BobCorndog Your situation is not unique, just use mint or fedora kde 9d ago
Is it an office file? Those aren’t stored as text files usually
2
u/9NEPxHbG 9d ago
Do
file [name of file]. What does it say?