Thread: Mac Cheats
View Single Post
Old 10-15-2004, 04:38 PM   #5
The Dude
Elite Waterdeep Guard
 

Join Date: September 11, 2002
Location: Santa Clara, CA
Age: 61
Posts: 26
Depending on your level of understanding of text files - this may clear things up or just sound like gobbildy gook. If it's the latter feel free to contact me offline and I'll be happy to help. I'm a fellow Mac user.

The problem has to do with line termination characters. The J you're seeing is actually a control-J (aka ^J or \n). I'm guessing you edited the file with TextEdit? I recently did the same thing - doh!

The issue is that the file needs to have its lines end with a carriage return _and_ line feed - two characters - (\r\n) as is customary on Windows.

On the Mac, under (OSX and any UNIX), just a line feed (\n) is normally used to terminate a line. Under OS9, just a return (\r) was used.

The default Mac text editors (TextEdit under OSX or SimpleText under OS9) only grok the standard for their version of the OS. They shouldn't mess up the lines that are already there, but any you add won't be terminated correctly.

You need to use an editor that's aware of these line termination issues and lets you do the right thing. In this case - you want to add lines ending in \r\n.

I think BBEdit is pretty smart about it (preserves whatever scheme prevails in the file it's editing). If you install XCode (developer tools) I think it has some options to control this.

I used vi and dealt with it by hand - not something for feint of heart.
The Dude is offline   Reply With Quote