Need an application that displays invisible characters

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.
 

Corrado33

macrumors member
Original poster
Sep 2, 2008
62
0
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....??
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
7
USA
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.
 

rowsdower

macrumors 6502
Jun 2, 2009
269
1
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.
 

Corrado33

macrumors member
Original poster
Sep 2, 2008
62
0
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.
 

Fishrrman

macrumors Core
Feb 20, 2009
19,339
6,667
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

miles01110

macrumors Core
Jul 24, 2006
19,261
31
The Ivory Tower (I'm not coming down)
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.
 

kathk

macrumors newbie
Oct 27, 2018
1
0
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.