[NTLK] (still offtopic) Mac/PC/Unix line endings Re: offtopic .sit/.zip files

From: Felix Arndt (F.Arndt_at_GMX.net)
Date: Mon Jul 02 2001 - 16:45:23 EDT


Hi Victoria and Monte!

On 29.06.2001 23:32 Uhr you wrote using the account <vandm1_at_earthlink.net>:

> Are you sending a .html page along with images? If so your problem
> may be with the 'text' HTML file. Macs and PC's have a different
> end-of-file character.
Of course you're talking about line endings, not file endings (there used t=
o
be a special character for that, a "control-z", if my memory doesn't fail
me).

Brief (?) excursion on line endings used in different Operating Systems
(OS's):

* CR is "Carriage Return", ASCII code 13, LF is "Line Feed", ASCII code 10;
they both emerged from the ancient type writers. In fact, LF-CR would be th=
e
most "realistic" virtual typewriting method... =3D)))

* Mac OS always used CR as line endings, though cleverly built apps like
BBEdit (automatically adapts to -- and converts, if needed -- virtually ANY
usual line ending style!) and compilers could handle others as well...
But now as the times of "X" (know the hiphop tune? =3D))) emerge, it may go
different, since it is based on Unix (see below).

* Unix has LF as line endings (as well as Amiga?).

* DOS and OS's built onto that file system (like Windows, Atari, ...) use
CR-LF as line endings, and at least the standard apps (Notepad and Wordpad
that is; BTW, for text editing, I'd prefer Wordpad a MILLION times, since i=
t
is able to do some basic drag'n'drop editing, common on the Mac, rudimentar=
y
on Windows...) don't "handle" other line endings, they just put the whole
file into a single line... Are there more clever editors for Windoze?

Some further remarks for Mac apps: SimpleText (Mac Standard Editor) isn't
clever as well when it comes to line endings, and the text decorations (i.e=
.
fonts, sizes, bold etc.) are saved to the Resource fork and thus get lost o=
n
ASCII import, so unless you use a special SimpleText XTND (and XTND aware
app), you'll loose them. That SimpleText XTND is a converter that can be
used to build normal and "Read Only" SimpleText files from other documents,
even containing pictures -- really neat...!

> And again the PC's are clueless for display.

That depends. Web browsers simply ignore that kind of white space character=
s
unless forced to obey them (incl. tabs) by using the "preformatted" (<PRE>)
tag.
When it comes to editors, it's a matter of clever programming (ref. BBEdit)
rather than choosing the Operating System. Such intelligence is not even
built into Mac OS as yet.

> Stuffit Deluxe has a translation option to change text eof.
(eol, end of line that is)
... which you have to use with caution (StuffIt Expander has that option as
well, I think).
Normally, StuffIt is very clever in deciding when NOT to use that
translation (when it's text files, it helps, but it destroys any other kind
of files!), but I'd rather not rely on that and either choose "BBEdit" as
Creator of any textual files (in the Internet control panel) or convert the=
m
later by a drop-on app.
Or just keep the original archive, just in case.

Final word about creating text files for other people NOT using a Macintosh=
:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
Don't just fire up SimpleText, intensively format your writings and expect
everything to come out fine on a non-Macintosh Computer:
* they don't have Resource forks, so all formatting is lost;
* they have a different character encoding scheme (like the Atari's
"non-beta" sharp-s '=DF', but worse...), so Umlauts and other special chars
(curly quotes and such) don't translate;
* compared to that, the line ending difference is rather harmless (but also
annoying).

INSTEAD, use:
* Rich Text Format (RTF, many word processing apps can store that)
* HTML formatted text (DIY or use an editor) or
* Portable Document Format (Adobe Acrobat PDF, rather expensive except if
you use PDF Creator, a printer driver).

Thus, many people will be able to read/print your stuff.

Please excuse this lengthy posting, but that's one subject of "Operating
Systems intercourse" =3D))) that has to be covered nicely... (I hope I did.)

Another is the original "mail traffic between the worlds" -- but that was
answered very fine by Bill Davis and Ed Kummel (at least it left nothing to
be added in by myself)!

Have a fine time everybody, especially the photographer Bob Barkany who
started this thread...!

Felix
--=20
"There is no reason anyone would want a computer in their home."
--Ken Olson, president, chairman and founder of Digital Equipment Corp.,197=
7

--
This is the Newtontalk mailinglist - http://www.newtontalk.net
To unsubscribe or manage: visit the above link or
	mailto:newtontalk-request_at_newtontalk.net?Subject=unsubscribe



This archive was generated by hypermail 2.1.2 : Sun Sep 09 2001 - 19:49:23 EDT