Weird behavior with TextEdit text files
I use both Mac OS X and Windows XP back and forth. I never really noticed this before with any text files created in Panther so it may be something with Tiger (I don't know).
When I create a text file using TextEdit on OS X and then open it using NotePad on Windows XP, all my breaks are screwed up. Everything is condensed into one block with square break characters to represent where I inserted a hard break.
Opening the files using Microsoft Word on Windows will display the file fine.
So it's kinda weird. Is TextEdit to blame or Notepad on Windows.
When I create a text file using TextEdit on OS X and then open it using NotePad on Windows XP, all my breaks are screwed up. Everything is condensed into one block with square break characters to represent where I inserted a hard break.
Opening the files using Microsoft Word on Windows will display the file fine.
So it's kinda weird. Is TextEdit to blame or Notepad on Windows.
Comments
I'm using fink on Tiger at the moment and found a nifty utility 'dosunix' which allows you to convert a DOS (Windows) plain text file to a *nix one. I think they'res a 'unixdos' program to do the job you're asking too.
My solution is a bit of terminal kludge using what I know so far, so they'res bound to be a nice Applish solution to this.
I used to have to do this with BBEdit files which were being swapped between macs and PC's, though it was a while ago and I have forgotten the encoding you need.
EDIT: Just fired up BBEdit to have a look at the save options (also got asked if I wanted to upgrade 7.0.1 to 8.2.1 so you can see I have not used this app for awhile) and there was a function to save as DOS line breaks, and it might not have been the encoding at all.
Currently here are my Text Edit text encoding settings:
Opening Files: Automatic
Saving Files: Western (Windows Latin 1)
I previously tried UTF-8, but that didn't really make a difference.
I am aware that Windows and UNIX have different line breaks, but I figure that if the file is encoded in Western (Windows Latin 1) that it should open fine in notepad.
Could someone please just create a plain text file in Text Edit and try opening in in Notepad on Windows to see if the same problem occurs.
I created a file with Notepad. Brought it to my Mac and edited it. The edited portions all were bunched together with two square characters representing where I had inserted a line break.
1) I created a text file with BBEdit that had DOS linebreaks.
2) I opened the file in TextEdit and Saved As another .txt copy.
3) I opened the new copy in BBEdit and the linebreaks were still DOS.
I did notice that if I set TextEdit's text format preference to be plaintext, new text documents had unix linebreaks. However, based on the test above, files created with DOS linebreaks have that format preserved.
Except for plaintext files created in TextEdit confusing NotePad, I'm not sure what your problem is.
Funny thing is that Word has no problem reading a text file created with TextEdit. I guess that's because Word accepts a lot more types of text.