image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old November 9th, 2000, 10:09 AM
Registered User
 
Join Date: Nov 2000
Location: Nashville, TN
Posts: 5
Allan Crowson is on a distinguished road
I am attempting a trial migration of our OS9/WebSTAR/Lasso intranet site to OSX/Apache/Lasso(OSX beta!), and need to be able to edit text files. Lasso requires the files to have a .lasso suffix, rather than HTML, and I need to be able to edit the files. Under OS9, any number of editors (SimpleText, BBEdit, Tex-Edit) could open text files regardless of any suffixes. Now, under OSX, I can't open a simple HTML text file with a .lasso suffix! Yes, I tried the OSX beta for Tex-Edit. I've yet to open a previously existing document and not crash. So much for that. The bundled TextEdit insists on trying to render the HTML, and I can find no way to get to the underlying source. The bundled HTML Editor won't open half the .html files I have, even in source mode, and absolutely refuses to recognize any .lasso files. Does anyone know of a way to work in plain old HTML source mode on HTML files, especially files with something other than a .html suffix? Without going into Classic?!?!?
Reply With Quote
  #2  
Old November 9th, 2000, 11:32 AM
Registered User
 
Join Date: Oct 2000
Posts: 25
Vroomfondel is on a distinguished road
Talking

Open Terminal.app and attack it with vi?
Reply With Quote
  #3  
Old November 9th, 2000, 11:41 AM
Registered User
 
Join Date: Oct 2000
Posts: 25
Vroomfondel is on a distinguished road
Exclamation

My glib 'use vi' remark made me think of a can o' worms waiting to pounce
on unwary MacOS X users: Classic uses ^M as the end of line while BSD use
^J. I..e, there are two flavors of text files on your system and half the tools
aren't ready to deal with the text files created by the other half.

Is there a tool on MacOS X to convert the end-of-line characters one way
or the other? I don't even have Classic installed, so everything I'm doing
uses the Unix flavor text format (unless I download something from on
of my other Macs over the net). I've got a little command-line app I
wrote similar to

#include <stdio.h>
void main( void )
{
int x;
while ( ( x = getchar() ) != EOF )
{
switch( x ) {
case '\r': x = '\n'; break;
case '\n': x = '\r'; break;
}
putchar( x );
}
}

to deal with the situation (note: I typed the above code in off-the-cuff and
haven't compiled it; it seems OK, but it may not work).

This problem is yet another indication of the half-baked nature of MacOS X.
Reply With Quote
  #4  
Old November 9th, 2000, 12:36 PM
endian's Avatar
Dis Member
 
Join Date: Sep 2000
Location: inside my skin
Posts: 960
endian is on a distinguished road
Have youset TextEdit's prefs to ignore rich text commands in HTML files?
__________________
g4 400 AGP - 512 RAM
10GB internal (dumping ground) + 60GB (30 GB OSX partition/30 GB OSX Server partition) - 3GB external SCSI (OS9/and I think the Public Beta is still on there somewhere) - DVD-RAM - ZIP

Reply With Quote
  #5  
Old November 10th, 2000, 11:50 AM
Registered User
 
Join Date: Nov 2000
Location: Nashville, TN
Posts: 5
Allan Crowson is on a distinguished road
Quote:
Originally posted by endian
Have youset TextEdit's prefs to ignore rich text commands in HTML files?
That appears to have done it. I'd tried that earlier, but apparently it didn't work right unless I applied the pref, and then opened the files. It dind't seem to work on open files, so I assumed it wasn't working. Thanks!
Reply With Quote
  #6  
Old November 10th, 2000, 12:28 PM
endian's Avatar
Dis Member
 
Join Date: Sep 2000
Location: inside my skin
Posts: 960
endian is on a distinguished road
yeah you have to reopen the file.

I agree it is harder than it has to be, but hopefully BBedit will fix that before final with a carbon version (even though it works fine in classic now).
__________________
g4 400 AGP - 512 RAM
10GB internal (dumping ground) + 60GB (30 GB OSX partition/30 GB OSX Server partition) - 3GB external SCSI (OS9/and I think the Public Beta is still on there somewhere) - DVD-RAM - ZIP

Reply With Quote
  #7  
Old December 4th, 2000, 11:19 AM
Registered User
 
Join Date: Dec 2000
Location: Branford, CT
Posts: 32
BenW is on a distinguished road
Arrow vi, emacs, and CR-LF

If you're going to attack it with Terminal.app, why not use emacs? It's at least somewhat closer to intuitive than vi.... The simple way of solving your CR-LF/newline problems is to use a perl commandline (or awk, I suppose, but I don't know awk).

To make mac files legible in Terminal I use

<code>perl -pe 's/\r/\n/g' myfilename > mynewfilename</code>

which does the job nicely. Though I think emacs is savvy to the CR-LF problem in any case.

__________________
G4/400(PCI)
448 MB RAM
13G Partitioned:
--9.0 (7.5 GB HFS+)
--OSX/PB (4.5 GB HFS+)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with HOME & END usage in text editing... NinoAvila Mac OS X System & Mac Software 4 April 10th, 2003 03:56 AM
Editing text in NSTableView - How? chocolate Software Programming & Web Scripting 1 February 20th, 2003 09:24 PM
Converting password dots to plain text? voice- Mac OS X System & Mac Software 2 February 4th, 2003 04:20 AM
Editing files remotely mjia Mac OS X System & Mac Software 5 February 22nd, 2002 05:42 PM
Converting text files from windows to unix (OSX) and back paulsomm Mac OS X System & Mac Software 1 December 4th, 2001 03:23 PM


All times are GMT -5. The time now is 06:42 AM.


Mac Support® Version 3.7.0 Beta 5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.