Skip to Content
author's profile photo Former Member
Former Member

What is difference between TEXT mode and BINARY mode?

Hi,

What is difference between TEXT mode and BINARY mode? In TEXT mode what is "ENCODING DEFAULT".

OPEN DATASET wl_filename FOR INPUT

IN TEXT MODE ENCODING DEFAULT.

OPEN DATASET wl_filename FOR INPUT

IN BINARY MODE .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 27, 2007 at 07:53 AM

    Hi vishnu,

    1. files like .TXT files are considered to be text,

    and other files like .EXE . DOC etc are binary files.

    2. In text files, after each line, there are two

    internal binary characters

    one for line feed and another one for newline.

    3. But, we don't have any meaning for it,

    when we view such files in notepad, for eg.

    Hence, to only get the understandable content,

    we should open such TXT files, in text mode.

    (we can also open them in binary mode,

    but we will get two extra characters after each line,

    and such two extra characters are meaningless

    for interpreting the text)

    4. In binary mode, each byte by byte is considered,

    without any meaning.

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 27, 2007 at 08:28 AM

    Hi Amit,

    For the text mode we use encoding default that is it supports all languages.

    since in binary mode it need not support any other languages

    so we need not use encoding default ...

    Regards.

    Sana.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 27, 2007 at 08:39 AM

    hi,

    1. text mode means the output will come as line by line.

    2. binary mode means , output will come as character by characer and in this we can create spaces, commas, symbols also

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.