Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Corrado33

macrumors member
Original poster
Sep 2, 2008
62
0
So I work with computational chemistry, and we usually work with files on windows boxes, however we've started the transition over to Mac Pros. I have my macbook pro, and I've installed the necessary software, however I have a problem.

We use Notepad to make the input files on XP, because it does not inbed any invisible characters (besides returns etc.) However, whenever I transfer a file (.txt) made with notepad over to my mac, the file will not run in the program we use. It gives an error that usually means you have invisible characters in your input file.

So if I retype the file in Textedit, (NOT copy and paste), the file works fine. The exact same (looking) input file. Does anyone know what's going on here, or know of an application that will let me see these pesky invisible characters? I've tried word, but couldn't find what I wanted, and... well... I hate Word for mac. It absolutely sucks.

Thanks in advance.
 
Yes I have tried that. It is in fact in plain text mode when I open it in Textedit. But just to be redundant, I even tried converting it to Rich Text, then back to Plain text.

I thought plain text files were just that, plain text files....??
 
TextWrangler is essentially BBEdit without the HTML formatting menus, which for the most part are useless.

Well the more important difference is TW is free. I use BBEdit, but that's because my work place bought it for me. The SVN integration in BBEdit is also nice.
 
We use Notepad to make the input files on XP, because it does not inbed any invisible characters (besides returns etc.) However, whenever I transfer a file (.txt) made with notepad over to my mac, the file will not run in the program we use. It gives an error that usually means you have invisible characters in your input file.

It could be that the line endings are in the wrong format. Traditionally Macs used a single carriage return (CR) character, Unix used a single line feed character (LF), and Windows used CRLF. There is no good reason for this. Macs now normally use LF since OSX is based on Unix. The text file you create in Notepad on XP probably has CRLF at the end of each line, which you won't see because it's interpreted as a newline indicator. Your program is probably expecting just an LF. I think if you open the file in TextEdit, copy it into a new TextEdit window, convert to plain text, and save, you will get the text with just LF line endings.

Edit: Found a discussion of this on Wikipedia.
 
It could be that the line endings are in the wrong format.

You sir... are EXACTLY correct. In textWrangler there is an option at the bottom to change the type of line returns and when I change it to Unix(LF) it works wonderfully.

I figured that out a full 5 minutes before I checked this thread. However you were wrong about one thing. Copying and pasting into a new textedit window does not, in fact, fix the problem. I simply change the type of line return in TextWrangler and I'm good to go.

Thanks for everything.
 
RE: Need an application that displays invisible characters

For a text editor that can show invisibles, try Tex-Edit Plus from Trans-Tex software:
http://www.tex-edit.com/

Very nice text editing application, with some advanced capacities built right into it.

- John
 
  • Like
Reactions: neutrino23
For a text editor that can show invisibles, try Tex-Edit Plus from Trans-Tex software:
http://www.tex-edit.com/

Very nice text editing application, with some advanced capacities built right into it.

Yikes, that site looks old.

"Tex-Edit Plus requires Mac OS 7.1 or newer for the classic version and Mac OS 10.1 or newer for the OS X version. "

...lol. There is a review from 2008 though, so it might be worth a look.
 
BBEdit does not appear to be helpful for determining the actual invisible line terminators on a file. While the "show invisibles" feature it great for other things, BBEdit appears to be standardizing the line terminator when the file is opened on a Mac. So, if you want to produce a file on a Mac that terminates the line with a CRLF, when you open it in BBEdit the terminator is changed to LF only. There's no way with BBEdit to determine if if the fie you produced is accurate.

I'm looking for other solutions to viewing invisible for confirmation if anyone has suggestions? All the editors I've tried "standardize" the file to LF when the file is opened.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.