473,651 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text files

Is difference between interpretation of \n only difference ?

Jul 19 '07 #1
14 2036
On Thursday 19 Jul 2007 11:33 pm, Kenneth Brody
<ke******@spamc op.netwrote in message
<46************ ***@spamcop.net >:
ra****@op.pl wrote:
>>
Is difference between interpretation of \n only difference ?

Difference in what?

Oh, I see... You put some critical information in the subject
and failed to include it in the body of your message. The
relevent information is "text files".

So, I assume your question is "are there any differences between
text mode and binary mode, other than '\n' interpretation? "
I rather think the OP meant to ask whether there were any other
differences apart from end-of-line interpretation, between different
text files on different systems.

To the OP:

As far as text files of different system's are concerned, they are
meant to be portable, and to a Standard C program, there should be
no difference between text files created by it and those created by
other implementations .

Under the hood, there may well be many more differences than just the
end-of-line one, but they're all supposed to be well hidden by the
operating system and the C library.
Jul 19 '07 #2

<ra****@op.plwr ote in message
news:11******** **************@ m3g2000hsh.goog legroups.com...
Is difference between interpretation of \n only difference ?
The behavior of fseek.
Jul 19 '07 #3

<ra****@op.plwr ote in message
news:11******** **************@ m3g2000hsh.goog legroups.com...
Is difference between interpretation of \n only difference ?
No. Text files often have a control Z as end of file marker. However on most
systems the text and binary formats are in fact identical.#
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Jul 19 '07 #4
On Friday 20 Jul 2007 1:29 am, Malcolm McLean
<re*******@btin ternet.comwrote in message
<jL************ *************** ***@bt.com>:
>
<ra****@op.plwr ote in message
news:11******** **************@ m3g2000hsh.goog legroups.com...
>>
Is difference between interpretation of \n only difference ?

No. Text files often have a control Z as end of file marker.
[ ... ]

AFAIK, this is rare among most modern systems.
Jul 19 '07 #5
Malcolm McLean wrote, On 19/07/07 20:59:
>
<ra****@op.plwr ote in message
news:11******** **************@ m3g2000hsh.goog legroups.com...
>Is difference between interpretation of \n only difference ?
No. Text files often have a control Z as end of file marker. However on
most systems the text and binary formats are in fact identical.#
So you think most systems are not DOS/Windows/VMS/MacOS-9/whatever? I'm
sure at least one other OS I know has a different format for text files
to binary files, but I'll stick to the ones where I know there are
differences. Also, remember that Windows probably includes WinCE and its
successors which are used in some PDAs and mobile phones.
--
Flash Gordon
Jul 19 '07 #6
Flash Gordon <sp**@flash-gordon.me.ukwri tes:
Malcolm McLean wrote, On 19/07/07 20:59:
><ra****@op.plw rote in message
news:11******* *************** @m3g2000hsh.goo glegroups.com.. .
>>Is difference between interpretation of \n only difference ?
No. Text files often have a control Z as end of file marker. However
on most systems the text and binary formats are in fact identical.#

So you think most systems are not DOS/Windows/VMS/MacOS-9/whatever?
I'm sure at least one other OS I know has a different format for text
files to binary files, but I'll stick to the ones where I know there
are differences. Also, remember that Windows probably includes WinCE
and its successors which are used in some PDAs and mobile phones.
What exactly does "binary format" mean? On many (most?) systems,
there's no such thing as a "binary format" -- or rather, there's a
practically infinite number of such formats, at least potentially.

A text file is (usually) just a special case of a binary file, with
some structure imposed on it.

Now it would make sense to ask what translations are performed when
access a file in text mode as opposed to binary mode, but I'm not sure
whether that's what the OP asked.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jul 19 '07 #7
"Malcolm McLean" <re*******@btin ternet.comwrite s:
<ra****@op.plwr ote in message
news:11******** **************@ m3g2000hsh.goog legroups.com...
>Is difference between interpretation of \n only difference ?
No. Text files often have a control Z as end of file marker. However
on most systems the text and binary formats are in fact identical.#
What on earth is "binary format"?

And what are "most systems"?

Jul 20 '07 #8
Richard wrote:
"Malcolm McLean" <re*******@btin ternet.comwrite s:
><ra****@op.plw rote in message
news:11******* *************** @m3g2000hsh.goo glegroups.com.. .
>>Is difference between interpretation of \n only difference ?
No. Text files often have a control Z as end of file marker.
However on most systems the text and binary formats are in
fact identical.#

What on earth is "binary format"?
A catch-all name, I presume, for all human-unreadable
information.

Jul 20 '07 #9
santosh said:
Richard wrote:
>"Malcolm McLean" <re*******@btin ternet.comwrite s:
>><ra****@op.pl wrote in message
news:11****** *************** *@m3g2000hsh.go oglegroups.com. ..
Is difference between interpretation of \n only difference ?

No. Text files often have a control Z as end of file marker.
However on most systems the text and binary formats are in
fact identical.#

What on earth is "binary format"?

A catch-all name, I presume, for all human-unreadable
information.
Binary doesn't necessarily mean human-unreadable. Those amongst us who
have written programs in binary, as I have, will almost certainly agree
that, whilst reading binary isn't necessarily top of their Ten Fun
Things To Do Today list, it is nevertheless possible.

In any case, if you're right /and/ Malcolm is right, then text files are
unreadable too, on most systems. Is that your contention?

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jul 20 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
4927
by: Eric | last post by:
Assume that disk space is not an issue (the files will be small < 5k in general for the purpose of storing preferences) Assume that transportation to another OS may never occur. Are there any solid reasons to prefer text files over binary files files?
0
3311
by: Steve | last post by:
My application uses transfertext to create text files that are FTPed to a website and are processed by a webstore. The text files can be for one of three purposes: Add one or more items to the webstore, Update one or more existing items in the webstore or delete one or more items from the webstore. The Add text files begin with ADD in the first field to signal the webstore to add the item, the Update textfiles begin with UPDATE in the...
16
2658
by: thenightfly | last post by:
Ok, I know all about how binary numbers translate into text characters. My question is what exactly IS a text character? Is it a bitmap?
0
2387
by: richardkreidl | last post by:
I have the following hash script that I use to compare two text files. 'Class Public Class FileComparison Public Class FileComparisonException Public Enum ExceptionType U 'Unknown A 'Add D 'Delete
3
4262
by: Frustrated Developer via DotNetMonster.com | last post by:
I have posted a couple times on here already and found the user community to be very helpful. I took on a project before I realized how difficult a time I'm having working with a database. Assistance would be greatly appreciated! I am trying to allow certain users to be able to preview a database's contents without being able to update which I've accomplished. I've created a "Preview" button and set the datagrid to READ ONLY. Now I want...
10
3637
by: joelagnel | last post by:
hi friends, i've been having this confusion for about a year, i want to know the exact difference between text and binary files. using the fwrite function in c, i wrote 2 bytes of integers in binary mode. according to me, notepad opens files and each byte of the file read, it converts that byte from ascii to its correct character and displays
5
3159
by: praveenholal | last post by:
Hi Freinds , I want to convert the files that are in text format (.txt) to CSV file. I am working on Linux. So can anyone guide me. Here is my problem Description I have some result files which contains text fields and numeric fields which are seperated by tab and also there is a - between two numbers 10-20 . Another thing is that colons are also present in between in files name :: praveen
29
4855
by: list | last post by:
Hi folks, I am new to Googlegroups. I asked my questions at other forums, since now. I have an important question: I have to check files if they are binary(.bmp, .avi, .jpg) or text(.txt, .cpp, .h, .php, .html). How to check a file an find out if the file is binary or text? Thanks for your help.
1
3430
by: Xah Lee | last post by:
Text Processing with Emacs Lisp Xah Lee, 2007-10-29 This page gives a outline of how to use emacs lisp to do text processing, using a specific real-world problem as example. If you don't know elisp, first take a gander at Emacs Lisp Basics. HTML version with links and colors is at: http://xahlee.org/emacs/elisp_text_processing.html
0
10751
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
8347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8792
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8571
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.