Can Windows open a plain text file created in Linux?

Terminal Velocity

Well-Known Member
Joined
Oct 13, 2021
Messages
597
Reaction score
447
Credits
4,218
I created it with ''create new document'' >> ''empty document'' from right click menu, I pasted something in it and I have to open it tomorrow in a Windows computer, will it open?
 


Yes it should, however the carriage returns and line feeds can be messed up.

Instead of line this.
Instead of line this.
Instead of line this.

You get

Instead of line this. Instead of line like this. Instead of lines like this.

There is a tool in linux called "dos2unix" that fixes this,
There is also a windows application called notepad++ that can fix this.
 
Thanks for the fast reply, I thought to make the text file a PDF with libreoffice, that will open for sure, and it is also copyable
 
from Microsoft

Files that use the PDF file format can be saved and opened by using Word 2021, Word 2019, Word 2016, and Word 2013.

Important: PDF files might not have a perfect page-to-page correspondence with the original. For example, the pages might break at different locations.
 
I've done it before (text files). Sometimes it comes through okay, other times not. I really don't know what I did differently those times.
 
To "fix" line endings of any text file simply open it with VSCode and change line endings (bottom right is the button) and save file.

Same applies to encoding.
 
Yes but if I remember correctly with Windows the default text editor is Wordpad and saves it with a different file format by default. You will either have to save that file with a different file format with Wordpad or just use Notepad instead of Wordpad.
 
Last edited:
I thought Windows, by default, still opened files with the .txt extension using notepad... but then I've been using a real text editor for so long I might be a bit behind the times.
 
I thought Windows, by default, still opened files with the .txt extension using notepad... but then I've been using a real text editor for so long I might be a bit behind the times.
I don't know how to see the extension of a file in Cinnamon, in the properties it say ''text type'' but it doesn't specify if it is .txt
 
Top