# Txt file in Linux and Windows



## buccaneer (Mar 3, 2005)

Hi
I typed up a txt file in Kubuntu and burned it on CD but when I try to open it in Windows it comes out all messed up.Is there some difference between how the two OS'es work with txt files? If I needed to make a txt file that someone else could open, I would have to do it in Windows?Or could I somehow create a txt file in Linux that would open up correctly in Windows ?


----------



## kinbard (Jul 1, 2006)

It is hard getting windows to recognize linux files. One solution would be to create it in xp, as you mentioned. Another is to install open office on XP, which is now possible.


----------



## shuuhen (Sep 4, 2004)

The difference between the two operating systems is how it determines the end of a line of text. Some systems have a command called _unix2dos_ which will convert the text file to work with Windows. If it is not already available on your system, you might want to see if the package repositories have it.


----------



## Bartender (Jun 10, 2005)

While you're experimenting with this, try using a USB thumb drive instead of CD's. No coasters that way. I don't have a Linux PC up right now, but I know I've saved plain old text files to thumb drive and brought them over to W2K PC. 
Were you in abiword when you typed the txt file? Also, take a look at how Linux is going to save it. If I'm remembering correctly there's a drop-down box with options for the format. 
I'm sure you'll get this figured out.
As kinbard says, one way I know works is to install OpenOffice for Windows on the Windows partition. Write up the txt file in Linux OpenOffice, make sure you're saving it in the format you want.


----------



## hal8000 (Dec 23, 2006)

You can install Vim for windows, that way if you create text files in linux with vi or vim you should be able to read them. There are probably other OS editors wrote for windoze as well, have a look on sourceforge


----------



## buccaneer (Mar 3, 2005)

Hello

Well,I meant I would like to create txt files in Linux that other people -strangers- can open up in their system and since most people use Windows (with MS Office I think?), would it be possible for me to make a txt file in such a way that it'd right away open correctly in their systems?
Kinbard,I dont know if the people I have to send the file to have openoffice or not.I think most people stick with MS office coz they already have it dont they?
Shuuhen, thanks for the hint, I'll try that 
Bartender, I dont have a thumb drive .Cant afford one right now actually.I just typed that txt file in the default Kubuntu txt program.Maybe I should have tried open office for that hm?
Hal,for myself,I wouldnt mind opening the file in Linux itself,but if I am e-mailing something like a resume or something, I think the chances are the recipient would most likely run Windows right?I dunno if a lot of people have Vim?(I am looking up about what Vim is- I have no clue )


----------



## shuuhen (Sep 4, 2004)

vim and vi are text editors (my current favorite ones). vim is an improved version of vi, so if you have to pick between the two, you'll probably want vim.

Unfortunately there are a few different ways operating systems look at text files. This means any plain text file will look a little strange on one system even though it may look perfect on another (there are only three ways I know of, but it still happens some). If you have it in DOS format, it will just have a weird character at the end of each line on the non-Windows OS's.

One option you have is to save the files as Rich Text Format (.rtf) documents. This is a fairly universal format that should work with MS Word, OpenOffice.org Writer, AbiWord and other word processors. Google Documents even supports RTF documents. With RTF, you also can do some formatting (bold, italics, fonts, etc.)

I actually know some people that do not use Microsoft Office on their Windows machines. My university tells students that they require Microsoft Office (to an extent they do), but at least one of my friends there (in the same degree program I'm in) did fine without having a copy (using OpenOffice.org instead).


----------



## Geeksbydesign (Jul 10, 2007)

I also use Notepad++ in windows, it correctly parses files that I edit in Vim (on my linux box)


----------



## Bartender (Jun 10, 2005)

ooh, ooh, pick me pick me

corsair, if your main goal is to send documents to the rest of the sheep - er - I mean, Windows users who think they have to buy Word in order to type anything, type it up in OpenOffice, then "Save As" and go to the drop-down box in the "Save As" window. Find the line that says "Word97 (.doc)" or something similar. OpenOffice will save your document as a standard Word file.

Is that cool or what??

They're just about giving away thumb drives nowadays. Have you checked the prices lately? I just looked at Staples website - $10 for a 512MB. Jeepers. I paid $20 for a 64MB just a coupla years ago!


----------



## buccaneer (Mar 3, 2005)

'ello
Shuuhen,I'll do that Rich text format thingy.Btw most people I know use MS office for some reason.Somehow they think it's the best.The only puter I know of that has open office running is my niece's puter but she didnt choose it by her own self- guys who assembled her puter put it in, so thats what she uses.The rest use MS word.
Geeksbydesign, have you ever tried opening the Vim file in normal windows notepad?Come out okay for you?
[email protected] Bartender:grin:Well, yes I wanted to send a txt file in reply to a job ad and they wanted the application in text file(why?virus scare?).Hey its nice that openoffice saves files as a Word document.I'll have to try that too.$10, Bartender, comes up to a higher amount after currency exchange .But still, it sounds worth looking into.I just use a re-writable cd to transfer data now.


----------



## Geeksbydesign (Jul 10, 2007)

corsair said:


> 'ello
> 
> Geeksbydesign, have you ever tried opening the Vim file in normal windows notepad?Come out okay for you?
> now.


No, I have trouble with it not showing the breaks correctly, then I have to turn on word wrap in notepad and it totally screws up the formating of the config file. I stumbled across this Notepad++ program, and it not only lines things up correctly, but it also numbers lines.


----------



## buccaneer (Mar 3, 2005)

Oh gawd why do they may so many formats that wont show up correctly in the default programs that common OSes use!I can never be sure if something I typed will show up right in another puterTy for the reply, Geek


----------



## Bartender (Jun 10, 2005)

corsair, take a look at the other formats in the OpenOffice "Save As" list. I'm sure there's an option to "save as .txt (ansi)" or similar if .txt is what you really do need to output.


----------



## buccaneer (Mar 3, 2005)

Well Bartender I have opendocument txt, Rich text format,text,and text encoded for saving as text. I guess Rich text format is the best outta these right?Oh yes I do need something that will enable me to write stuff in txt format in Linux that can be opened up by the Windows users.


----------



## kinbard (Jul 1, 2006)

I would go with rich text. Word Pad should then be able to open it.


----------



## buccaneer (Mar 3, 2005)

Oh thats good enough Kinbard.Rich text it is


----------

