text file in suse a ASCII file or binary file? - Suse

This is a discussion on text file in suse a ASCII file or binary file? - Suse ; Hello Group! I am really new to Linux and just want to ask a trivil question: text file in suse a ASCII file or binary file? I know that these two types of files are stored differently in an operating ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: text file in suse a ASCII file or binary file?

  1. text file in suse a ASCII file or binary file?

    Hello Group!

    I am really new to Linux and just want to ask a trivil question:

    text file in suse a ASCII file or binary file?

    I know that these two types of files are stored differently in an operating
    system but not sure about the story with Suse or Linux/Unix. Can anyone tell
    me something?

    Thanks,
    Xiaochuan



  2. Re: text file in suse a ASCII file or binary file?

    On Fri, 26 Oct 2007, Xiaochuan Shen wrote:-

    >Hello Group!
    >
    >I am really new to Linux and just want to ask a trivil question:
    >
    >text file in suse a ASCII file or binary file?


    A text file is usually stored in plain ASCII format.

    >I know that these two types of files are stored differently in an operating
    >system but not sure about the story with Suse or Linux/Unix. Can anyone tell
    >me something?


    Basically the plain text files are the same between the different OSes,
    although there are some minor differences between the formats relating
    to the End Of Line characters.

    Linux, of which openSUSE is one variant, along with the various BSD and
    UNIX use the ASCII character 10 (0x0a) as the EOL marker. MacOS[0] uses
    the ASCII character 13 (0x0d) as the EOL marker. DOS/Windows[1] is
    awkward and uses the ASCII character sequence 13 followed by 10 (0x0d
    0x0a) as its EOL marker.


    [0] Mac OS 8.5 does anyway. Haven't used Mac OSX so don't know if it
    changed when the kernel became BSD based.

    [1] And almost all the other DOS compatible OSes.

    Regards,
    David Bolt

    --
    www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
    | SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit
    SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit |
    RISC OS 3.11 | RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC

  3. Re: text file in suse a ASCII file or binary file?

    On Fri, 26 Oct 2007, in the Usenet newsgroup alt.os.linux.suse, in article
    , Xiaochuan Shen wrote:

    >I am really new to Linux and just want to ask a trivil question:
    >
    >text file in suse a ASCII file or binary file?


    How do you define an 'ASCII' or 'binary' file? ASCII is a character
    set - see 'man 7 ascii'. But a _text_ file may use other character
    sets - try 'apropos 8859' and see what turns up.

    >I know that these two types of files are stored differently in an
    >operating system but not sure about the story with Suse or Linux/Unix.
    >Can anyone tell me something?


    You may want to talk to your instructor about this, and see what the
    supposed differences are. In *nix, a binary type of file _MAY_ have
    a "magic number" as the first few bytes. See

    [compton ~]$ whatis file magic | grep -v Fi
    file (1) - determine file type
    magic (4) - file command's magic number file
    [compton ~]$

    but as far as *nix is concerned, the whole _world_ is a file, and you
    store them the same way whether the file is ASCII, ISO-8859-15, Big-8,
    or some super character set from windoze, or it the file is compressed,
    executable, or what-ever.

    Old guy

  4. Re: text file in suse a ASCII file or binary file?

    On 2007-10-26, Xiaochuan Shen wrote:
    > I am really new to Linux and just want to ask a trivil question:
    > text file in suse a ASCII file or binary file?

    That doesn't compute.

    > I know that these two types of files are stored differently in an operating
    > system but not sure about the story with Suse or Linux/Unix. Can anyone tell
    > me something?

    Nonsense. A file is a file.
    What they contain may be text or binary. But text is only a subset of a
    'binary' file anyway.

    There _is_ a small difference in the way an application would write to a
    file, between one opened in text mode or binary mode. The difference is
    mainly in the end-of-line. In binairy mode, the same application will
    produce the same data in Linux/Unix as in Windows. If you open a file in
    text mode, writing a newline char ('\n') will write an ASCII 10 in unix, and
    ASCII 13 followed by ASCII 10 in Windows. (and ASCII 13 in Mac?)

    But that doesn't translate to any other kind of object on the file system.
    They're both just files.

    --
    There is an art, it says, or rather, a knack to flying.
    The knack lies in learning how to throw yourself at the ground and miss.
    Douglas Adams

  5. Re: text file in suse a ASCII file or binary file?

    Rikishi 42 wrote:
    >On 2007-10-26, Xiaochuan Shen wrote:
    >> I am really new to Linux and just want to ask a trivil question:
    >> text file in suse a ASCII file or binary file?

    >That doesn't compute.


    >> I know that these two types of files are stored differently in an operating
    >> system but not sure about the story with Suse or Linux/Unix. Can anyone tell
    >> me something?

    >Nonsense. A file is a file.
    >What they contain may be text or binary. But text is only a subset of a
    >'binary' file anyway.


    >There _is_ a small difference in the way an application would write to a
    >file, between one opened in text mode or binary mode. The difference is
    >mainly in the end-of-line. In binairy mode, the same application will
    >produce the same data in Linux/Unix as in Windows. If you open a file in
    >text mode, writing a newline char ('\n') will write an ASCII 10 in unix, and
    >ASCII 13 followed by ASCII 10 in Windows. (and ASCII 13 in Mac?)


    That's right but also not right. A program runs on one operating
    system at a time. On *nix computers, the operating system simply
    writes the bytes in an "ASCII" file to the output medium. Newlines
    are written as newline characters. So it is the same as a binary
    file.

    It is only on Windows and Macs that there is any translation done.

    >But that doesn't translate to any other kind of object on the file system.
    >They're both just files.


    Yes.

    --
    --- Paul J. Gans

  6. Re: text file in suse a ASCII file or binary file?

    Xiaochuan Shen wrote:
    > Hello Group!
    >
    > I am really new to Linux and just want to ask a trivil question:
    >
    > text file in suse a ASCII file or binary file?
    >
    > I know that these two types of files are stored differently in an operating
    > system but not sure about the story with Suse or Linux/Unix. Can anyone tell
    > me something?
    >
    > Thanks,
    > Xiaochuan
    >
    >

    Maybe there is a reason why ASCII should be standard.
    If I save some writing in Open Office as text it will not have
    a return on the end of each line, but only where I have
    manually put one like end of paragraph.
    If I drop this into a blog or an email it will extend the text
    into one long line.
    If I save this as ASCII text with good old Word Perfect it
    will put the return on the end of each line. I can now copy
    and past it anywhere and it always retains the line lengths as
    written.

    I have often wondered why the modern word processors do not
    put the return on each line, or if there is a way of forcing a
    return on the end of each line.

    Text should be exchangeable across the all OSs.

    Things like "Jaws" in Windoz (Speech synthesizer) for visually
    impaired people relies on the writing being .txt. unformatted
    other than line terminators.

    So we see that there may be more implications here than is
    first seen.

    Years ago I wrote books in Windoz Word Perfect and saved
    copies in ASCII text format. Linux OSs do not have a bother
    with this providing there is a return at the end of each line.
    Otherwise the lines seem to go on until it meets return like
    end of paragraph.

    Any comments would be appreciated.

    Don,
    Keep smiling.

  7. Re: text file in suse a ASCII file or binary file?

    On Sat, 27 Oct 2007 11:30:47 +0930, don wrote:

    > Xiaochuan Shen wrote:
    >> Hello Group!
    >>
    >> I am really new to Linux and just want to ask a trivil question:
    >>
    >> text file in suse a ASCII file or binary file?
    >>
    >> I know that these two types of files are stored differently in an operating
    >> system but not sure about the story with Suse or Linux/Unix. Can anyone tell
    >> me something?
    >>
    >> Thanks,
    >> Xiaochuan
    >>
    >>

    > Maybe there is a reason why ASCII should be standard.
    > If I save some writing in Open Office as text it will not have
    > a return on the end of each line, but only where I have
    > manually put one like end of paragraph.
    > If I drop this into a blog or an email it will extend the text
    > into one long line.
    > If I save this as ASCII text with good old Word Perfect it
    > will put the return on the end of each line. I can now copy
    > and past it anywhere and it always retains the line lengths as
    > written.
    >
    > I have often wondered why the modern word processors do not
    > put the return on each line, or if there is a way of forcing a
    > return on the end of each line.


    Because, for example, if you reformat the page to a different width, that
    is not where they will be. Also because modern wordprocessors save a lot
    of additional formatting data. And line length will vary with font size.
    There are a lot of factors going into a decent word processor.

    >
    > Text should be exchangeable across the all OSs.


    It is - if you use the same application. e.g. you can read the same file
    on MS with OpenOffice that you wrote on Linux with OpenOffice.

    >
    > Things like "Jaws" in Windoz (Speech synthesizer) for visually
    > impaired people relies on the writing being .txt. unformatted
    > other than line terminators.


    OK - so use a simple text editor to prepare it rather than a word
    processor. You also use a text editor to prepare HTML for your web site.
    If you try to use a word processor and don't save it as text, it won't
    work.

    >
    > So we see that there may be more implications here than is
    > first seen.
    >
    > Years ago I wrote books in Windoz Word Perfect and saved
    > copies in ASCII text format. Linux OSs do not have a bother
    > with this providing there is a return at the end of each line.
    > Otherwise the lines seem to go on until it meets return like
    > end of paragraph.
    >
    > Any comments would be appreciated.
    >
    > Don,
    > Keep smiling.


    I don't really see what you are complaining about. Text is text - word
    processing is word processing - they are not the same thing. If you were
    to look at an old WordStar document, you would find it is readable, yes,
    but it is not pure text - it has formatting mark up.


  8. Re: text file in suse a ASCII file or binary file?

    In ray:

    [Snip..]

    > I don't really see what you are complaining about. Text is text - word
    > processing is word processing - they are not the same thing.


    I call this the Information Delusion. It astonishes me that some cannot
    distinguish information (text/imagery) from presentation (media). Truly
    "The Medium is the Message" as Marshall McLuhan observed:

    http://en.wikipedia.org/wiki/The_medium_is_the_message

    I cannot begin to tell you how many literal weeks of time I wasted as a
    geek at work either (1) pulling genuine information out of media or (2)
    protecting my information contribution from distortion in media.

    How the hell did Einstein ever get anywhere without M$ Turd?

    And don't EVEN get me started about M$ Sourpoint...

    --
    Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
    Pardon any bogus email addresses (wookie) in place for spambots.
    Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
    Kids jumping ship? Looking to hire an old-school type? Email me.

  9. Re: text file in suse a ASCII file or binary file?

    On Sat, 27 Oct 2007 12:39:41 +0000, Harold Stevens wrote:

    > In ray:
    >
    > [Snip..]
    >
    >> I don't really see what you are complaining about. Text is text - word
    >> processing is word processing - they are not the same thing.

    >
    > I call this the Information Delusion. It astonishes me that some cannot
    > distinguish information (text/imagery) from presentation (media). Truly
    > "The Medium is the Message" as Marshall McLuhan observed:
    >
    > http://en.wikipedia.org/wiki/The_medium_is_the_message
    >
    > I cannot begin to tell you how many literal weeks of time I wasted as a
    > geek at work either (1) pulling genuine information out of media or (2)
    > protecting my information contribution from distortion in media.


    There is a good reason modern web development practices emphasize
    separation of content from formatting - i.e. css and xhtml. An often
    missed point, on the other hand, is that glitz is nice but information is
    still king.


    >
    > How the hell did Einstein ever get anywhere without M$ Turd?
    >
    > And don't EVEN get me started about M$ Sourpoint...



  10. Re: text file in suse a ASCII file or binary file?

    On 2007-10-27, don wrote:
    > Maybe there is a reason why ASCII should be standard.
    > If I save some writing in Open Office as text it will not have
    > a return on the end of each line, but only where I have
    > manually put one like end of paragraph.

    That's called Word processing.
    Nothing to do with text editing. Learn the difference. Please.

    > If I drop this into a blog or an email it will extend the text
    > into one long line.
    > If I save this as ASCII text with good old Word Perfect it
    > will put the return on the end of each line. I can now copy
    > and past it anywhere and it always retains the line lengths as
    > written.

    I'm sure any word processor can do that.
    Just print to a text-only printer driver.

    > I have often wondered why the modern word processors do not
    > put the return on each line, or if there is a way of forcing a
    > return on the end of each line.

    Have you also wondered what would happen if you changed the margins of your
    text, the size of your paper or the font use use?

    > Text should be exchangeable across the all OSs.

    If you mean text files (ASCII), they mostly are. Plenty of tools to change
    the EOL. If you mean a real text, in a wordprocesor, the OS has nothing to
    do with it. The format is defined by the software.

    > Things like "Jaws" in Windoz (Speech synthesizer) for visually
    > impaired people relies on the writing being .txt. unformatted
    > other than line terminators.
    > So we see that there may be more implications here than is
    > first seen.

    These use text-onlly files. Not workprocessing files.

    > Years ago I wrote books in Windoz Word Perfect and saved
    > copies in ASCII text format.


    Did you publish these books? If so, did the people at the editor
    office/printing shop laugh, or did they just beat you up?

    > Linux OSs do not have a bother
    > with this providing there is a return at the end of each line.
    > Otherwise the lines seem to go on until it meets return like
    > end of paragraph.

    Yes, weird isn't it?

    > Any comments would be appreciated.

    Nah, I'd rather stop here. No point wearing out my keyboard on a brainless
    gitt like you.


    --
    There is an art, it says, or rather, a knack to flying.
    The knack lies in learning how to throw yourself at the ground and miss.
    Douglas Adams

+ Reply to Thread