Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > OT document format

Reply
Thread Tools

OT document format

 
 
Jeff Thies
Guest
Posts: n/a
 
      08-02-2004
I tend to move files back and forth from Mac to Windows to *nix.

My windows editor (NoteTab) is unable to recognize the Mac linefeeds and
tends to make long lines of everything with little square boxes where
the linefeeds were.

So what format is best for exchanging documents between different OS's?

DOS/Windows
Mac
UNIX
EBCDIC
Dos ASCII

???

And just what is the difference between ASCII and ANSI?

I'm unsure what the linefeed are, my catchalls seem to be:

/\r\n|\n|\r/
/\f/

I think the \r\n is windows, \n is UNIX and the \f is Mac

Is it better to use the numeric equivalents?

Jeff


 
Reply With Quote
 
 
 
 
bulge
Guest
Posts: n/a
 
      08-03-2004
On Mon, 02 Aug 2004 04:19:08 GMT, Jeff Thies
<(E-Mail Removed)> wrote:

> I tend to move files back and forth from Mac to Windows to *nix.
>
>My windows editor (NoteTab) is unable to recognize the Mac linefeeds and
> tends to make long lines of everything with little square boxes where
>the linefeeds were.


That might explain a site I'm trying to rework now. I noticed square
boxes too. (well, the w3c validator noticed them for me, I think). I
think it must've been from a Mac.

Don't know much about Macs so I can't help you there.


>
> So what format is best for exchanging documents between different OS's?
>
>DOS/Windows
>Mac
>UNIX
>EBCDIC
>Dos ASCII
>
>???
>
>And just what is the difference between ASCII and ANSI?
>
>I'm unsure what the linefeed are, my catchalls seem to be:
>
>/\r\n|\n|\r/
>/\f/
>
>I think the \r\n is windows, \n is UNIX and the \f is Mac
>
>Is it better to use the numeric equivalents?
>
> Jeff
>


 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      08-03-2004
Jeff Thies wrote:

> So what format is best for exchanging documents between different OS's?
>
> Mac


That'll do.

> UNIX


Even better.

> EBCDIC


Huh? You still imagine that *anyone* uses this monstrosity? Even within
IBM, EBCDIC is only used as a torture method for the extremely naughty.
They'll probably be forcing Darl McBride to write a program to convert
between the six different incompatible versions of EBCDIC for his sins.

> Dos ASCII
> DOS/Windows


The difference being?

> And just what is the difference between ASCII and ANSI?


ASCII is a character set of 128 characters that contains most of the
characters commonly used in Western text. It forms a proper subset of most
*modern* character sets such as ISO-8859-1 or UTF-8.

ANSI is the American National Standards Institute, although in this
context I believe you are referring to their standard for escape codes
(which set colours on terminals and do other fancy stuff). It was
overcomplicated so never used by any real terminals, but modified versions
were adopted for setting colours and stuff on Amigas and DOS.

I think you're getting three different concepts muddled up. Firstly
character set -- use UTF-8 or ISO-8859-15, not ASCII. ASCII hugely limits
which characters you'll be able to use. It has no £ nor € for instance.

Secondly, use Windows line endings. Most Unix editors and many Mac editors
should be able to both read and write Windows line endings. Certainly
Nedit and Nano on Linux can.

Thirdly, ignore ANSI -- it will only be important to you if you're doing
text-mode DOS programming in fancy colours.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
 
Reply With Quote
 
Jeff Thies
Guest
Posts: n/a
 
      08-03-2004
Toby Inkster wrote:
> Jeff Thies wrote:
>
>
>> So what format is best for exchanging documents between different OS's?
>>


<snip>

> I think you're getting three different concepts muddled up. Firstly
> character set -- use UTF-8 or ISO-8859-15, not ASCII. ASCII hugely limits
> which characters you'll be able to use. It has no £ nor € for instance.


It looks to me that in the windows text editors I've used that the
character set used is itself set by the OS, not by the text editing
program. Does that sound right? What a mess, at least on the windows side.
>
> Secondly, use Windows line endings. Most Unix editors and many Mac editors
> should be able to both read and write Windows line endings. Certainly
> Nedit and Nano on Linux can.


That is what I've been experiencing. Windows (as is so often the case)
handles other OS's poorly. The Mac hasn't complained, and of course, the
linux web server has no problem with anything.
>
> Thirdly, ignore ANSI -- it will only be important to you if you're doing
> text-mode DOS programming in fancy colours.


That will come as a blow to a client of mine who proudly proclaimed that
she only used ANSI!

Thanks. All this is so basic and internalized as to be obscured in every
day use. The simplest problems cause me more grief than anything else!

Jeff
>

 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      08-03-2004
Jeff Thies wrote:

> That is what I've been experiencing. Windows (as is so often the case)
> handles other OS's poorly.


WordPad handles Unix line breaks like a champ.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Document Format / Rich Text Format Editor in Java Dominik Java 4 03-22-2007 01:55 PM
A HTML document can be converted to XHTML document. mike Java 2 01-14-2005 06:00 AM
DocumentBuilder.parse() returns "[#Document: null]" Document Mike Java 0 09-06-2003 03:38 AM
Help with JDOM, turn org.jdom.Document -> org.w3c.dom.Document? Wendy S Java 1 08-04-2003 11:48 PM
Xalan document() function finding wrong document root Steve Carrow Java 0 07-28-2003 02:28 AM



Advertisments