TextEdit - Plain Text Files That Open In Windows?

Hi. Just got an iMac. I've been trying to make plain text files in TextEdit that show up correctly in Windows on a PC. I've tried saving the same document in 4 different formats:

- Plan Text Unicode (UTF-8)
- Plain Text Unicode (UTF-16)
- Plain Text Western (Mac OS Roman)
- Plain Text Western (Windows Latin 1)

But none of these look right on a PC. All of the line breaks I've entered show up replaced by black rectangles. Why is this?

What format should I save as in TextEdit, to create Plain Text files that are compatible with both PC and Macs?

17" iMac 2GHz Intel Core 2 Duo, 2GB RAM, 250GB Hard Drive, Mac OS X (10.4.8)

Posted on Jan 26, 2007 3:24 AM

Reply
12 replies

Feb 7, 2007 2:19 PM in response to Tom Gewecke

Hi Tom,

Using TextEdit 1.4 I saved out the same file in the two formats you recommended; Latin-US (DOS) and Western (DOS Latin 1). I then transferred these over to my PC and opened them up in Windows Notepad...

And guess what? Exactly the same problem. All the returns I'd entered to go down a line (a line break) were replaced by black rectangles! So, I still can't make a simple text file on a Mac that looks right on a PC.

Any other suggestions?

Jan 26, 2007 4:01 AM in response to Reuben Feffer

First, note that TextEdit does not create plain text files, it creates rich text files (.rtf). If you truly want plain text, try the free TextWrangler:

http://www.barebones.com/

As to the line break problem, Macs use just a carriage return as the end-of-line character, while Windows uses a carriage return followed by a line break character. At least, that's how I understand it. Most likely, whatever app you're using on Windows is dumb enough that it can't figure out what to do with the Mac line endings. TextWrangler will let you change the line breaks, so you could use it to create plain text files with Windows line breaks. Of course, that doesn't help if you didn't really want plain text (ie, absolutely no styling, just raw text).

Jan 26, 2007 5:50 AM in response to Reuben Feffer

Howdy,
Welcome to discussions!

You might also want to try the text editor, Smultron which I find to be quite good:

http://smultron.sourceforge.net/

I think it has a setting under 'Advanced' to set it to always produce txt files, it might be worth seeing if the output on Smultron appears nicer on your Windows machine.

Martin BG
Life As An Apple Switcher - http://aurora7795.blogspot.com

MacBook, Intel Mac Mini, iMac G3 Mac OS X (10.4.8) Using Parallels Desktop to connect to Windows XP

Jan 26, 2007 6:28 AM in response to Reuben Feffer

I've tried saving the same document
in 4 different formats:

- Plan Text Unicode (UTF-8)
- Plain Text Unicode (UTF-16)
- Plain Text Western (Mac OS Roman)
- Plain Text Western (Windows Latin 1)


TextWrangler, as mentioned by others, is the best way to make sure line endings are compatible with whatever Windows app you are using, but you might also try saving in TextEdit as Western (DOS Latin 1) or Latin-US (DOS). You can add these to your encodings menu by going to the bottom of the list and selecting "customize."

Feb 8, 2007 4:49 AM in response to Tom Gewecke

Ok, I will get TextWrangler.

But still, with all these "I'm A Mac, I'm a PC" adverts, that imply that the PC is inferior to the Mac, you'd think they'd have at least provided you with the software to create simple text files that are compatible with PCs! Yes, I can make cool slideshows and take silly Photo Booth pictures of myself on a Mac. But can I make simple text files? Nope.

Maybe in Leopard? Maybe that's the secret feature 😉

Feb 8, 2007 8:41 AM in response to Reuben Feffer

But can I make simple text files? Nope.

The Mac has no trouble making "simple" text files. The problem is that the software you are using on Windows has trouble reading simple text files. The Windows software requires two characters to end every line, even though one would suffice. The Unix convention was a de facto standard years before MSDOS was created.

A "make Windows-version" feature in TextEdit might be useful, but there should be -- and probably is -- software on the Windows side that can use and/or translate Unix line endings to the DOS convention.

Wikipedia has an article with more than you probably want to know about line endings <http://en.wikipedia.org/wiki/Line_endings>.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

TextEdit - Plain Text Files That Open In Windows?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.