A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows 7 » Windows 7 Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Which CR/LF & EOF text file convention does Android use?



 
 
Thread Tools Rate Thread Display Modes
  #16  
Old December 19th 15, 01:53 PM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Eef Hartman
external usenet poster
 
Posts: 21
Default Which CR/LF & EOF text file convention does Android use?

In alt.os.linux Richard Kettlewell wrote:
since OS/X (which is unix-based - BSD, not SysV).


OSX uses LF.


So that's the Unix convention (\n which is LF = 10 (decimal)).
In C \r is the CR (13) char, but that's NOT the line terminator
(as someone already noted it was used for overprinting).
Ads
  #17  
Old December 19th 15, 01:55 PM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Mike Tomlinson
external usenet poster
 
Posts: 654
Default Which CR/LF & EOF text file convention does Android use?

En el artículo , crankypuss
escribió:

The text editor that I had almost completed 3 years ago when I walked
away from Windows noted the cr/lf content of the file being used and
kept using that one. But it was a general-purpose editor for anything
from hex to xml, not a "text(only) editor" like leafpad or gedit.


Notepad++ for Windows is excellent. I'm a recent convert, wish I had
discovered it much earlier.

--
(\_/)
(='.'=) Bunny says: Windows 10? Nein danke!
(")_(")
  #18  
Old December 19th 15, 03:44 PM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Ken Blake, MVP[_4_]
external usenet poster
 
Posts: 1,699
Default Which CR/LF & EOF text file convention does Android use?

On Sat, 19 Dec 2015 13:55:19 +0000, Mike Tomlinson
wrote:

Notepad++ for Windows is excellent. I'm a recent convert, wish I had
discovered it much earlier.




I'm also a recent convert to Notepad++ and agree with you that it's
excellent. On the other hand I use it so seldom that it hardly matters
to me.
  #19  
Old December 19th 15, 10:20 PM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Jasen Betts
external usenet poster
 
Posts: 148
Default Which CR/LF & EOF text file convention does Android use?

On 2015-12-19, crankypuss wrote:
Eef Hartman wrote:

In alt.os.linux William Unruh wrote:
But yes, then one has a whole variety of possibilities.Also {LF}{CR}
is sometimes used (MACs?)


Mac OS used to use [CR] only, but I do not know if that has changed
since OS/X (which is unix-based - BSD, not SysV).
And a lot of C-library implementations (for non-Unix) will silently
drop a [CR] at the end of a line (but NOT at the beginning) and when
writing a line will then add it again, that is: \n is translated to
[CR][LF] on Windows-like OS'es).
[LF][CR] has never been supported, as far as I know.


That's way messed up. Gratuitous insertion of data is an error. Put
that kind of junk in a low-level library and it pyramids up into just
the kind of mess we have today. imo.


it's been in the "C" language specification since what feels like
forever see the "b" flag in fopen()

--
\_(ツ)_
  #20  
Old December 20th 15, 08:25 AM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default Which CR/LF & EOF text file convention does Android use?

On Sat, 19 Dec 2015 13:55:19 +0000, Mike Tomlinson
wrote:

En el artículo , crankypuss
escribió:

The text editor that I had almost completed 3 years ago when I walked
away from Windows noted the cr/lf content of the file being used and
kept using that one. But it was a general-purpose editor for anything
from hex to xml, not a "text(only) editor" like leafpad or gedit.


Notepad++ for Windows is excellent.


+1
I use it extensively.

I'm a recent convert, wish I had
discovered it much earlier.


I think I started using it around 2002-2003, but really began to depend on
it around 2006. Since then, it's running about 98% of the time that the
computer itself is running, usually with at least a dozen tabs open, but
sometimes 3x or 4x that number.

--

Char Jackson
  #21  
Old December 20th 15, 11:54 AM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default Which CR/LF & EOF text file convention does Android use?

In message , Char Jackson
writes:
On Sat, 19 Dec 2015 13:55:19 +0000, Mike Tomlinson
wrote:

En el artículo , crankypuss
escribió:

The text editor that I had almost completed 3 years ago when I walked
away from Windows noted the cr/lf content of the file being used and
kept using that one. But it was a general-purpose editor for anything
from hex to xml, not a "text(only) editor" like leafpad or gedit.


Notepad++ for Windows is excellent.


+1
I use it extensively.

I'm a recent convert, wish I had
discovered it much earlier.


I think I started using it around 2002-2003, but really began to depend on
it around 2006. Since then, it's running about 98% of the time that the
computer itself is running, usually with at least a dozen tabs open, but
sometimes 3x or 4x that number.

FWIW, I find Notepad+ does what I want (which isn't much, but is a bit
more than Notepad).
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

No, no, you're not thinking, you're just being logical. -Niels Bohr, physicist
(1885-1962)
  #22  
Old December 20th 15, 12:09 PM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default Which CR/LF & EOF text file convention does Android use?

In message , Eef Hartman
writes:
[]
PS: the CR/LF sequence comes from the analogy with a typewriter, for
which you'll move first the carriage/print head back to the beginning
and THEN put the roll onto the next line - first computer terminals
(teletype's, the device name tty still derives from them) were
essentially typewriter-like devices (with PAPER!).


And, in fact, both CR/LF and LF/CR would thus both work. CR first is
more popular, because returning the carriage can take longer, so on
systems with poor or no handshaking, the line feed (advance the paper -
pinfeed or roller) could take place while the carriage was still
returning.

I remember VT - I think it's code 11 - for vertical tab, i. e. _reverse_
line feed (move the print head _up_ one line) - part of the four: 8,
backspace (head one position left); 9, tab (depending on hardware,
either move head one position right, or move to the next tab stop,
usually multiples of 8 positions); 10, move the head one position down
(or advance the paper); 11, the reverse of 10. 12, form feed - again,
depending on hardware, either advance a fixed number of lines or advance
to start of next page (usually, though not always, became clear screen
on screens); 13, carriage return.

I don't ever remember seeing much use for vertical tab - maybe those
convoluted files that printed a picture of the Enterprise on a line
printer used it, though they didn't need to.

Also, 8 - backspace - did _not_ mean delete; it meant backspace. 127
meant delete (sometimes translated into backspace-space-backspace on
screen-based systems - I'm not sure if it was possible for it to do
anything on paper-based ones!). I suppose the use of 8 to mean backspace
- which I think came in about the time PCs did, by which time most
computing _was_ screen-based - did allow the interpretation of 8 from
the keyboard to mean delete backwards, and 127 to mean delete forwards.

(Crossing threads*: I'm still depressed by how many newbies only ever
use one of the deletes. Especially around ends/beginnings of lines, when
using the other one can save a lot of time.)

*Crossing threads is to be avoided - it damages the screw.
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

No, no, you're not thinking, you're just being logical. -Niels Bohr, physicist
(1885-1962)
  #23  
Old December 20th 15, 01:10 PM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Eef Hartman
external usenet poster
 
Posts: 21
Default Which CR/LF & EOF text file convention does Android use?

In alt.os.linux "J. P. Gilliver (John)" wrote:
Also, 8 - backspace - did _not_ mean delete; it meant backspace.


And was used (on paper terminals) for overprinting too, i.e. to put an
accent on top of a letter or to underline it. Those teletypes had only
pure Ascii as their character-set.
It never worked on screens with backup storage (like CGA and EGA, the
memory could only store a single char for each position) so that's
where the bs-space-bs usage came from: overWRITE the previous char
with a space and then put the cursor on that place.
And as early (CP/M) computers often didn't have a DEL cq RubOut key
they started to use the BackSpace as delete too (yes, it PREdates
MS-Dos, was already so in CP/M and likewise (TRS-80, Apple II ?).
Those early micro-computers had a (compared to the PC) minimal
keyboard, no function keys and a minimum of special keys (no Del, Tab,
Esc etc). BS is typeble as ctrl-H so didn't need an extra key.
  #24  
Old December 20th 15, 02:51 PM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Mark Cassidy
external usenet poster
 
Posts: 1
Default Which CR/LF & EOF text file convention does Android use?

On Sun, 20 Dec 2015 11:54:19 +0000, J. P. Gilliver (John) wrote:

FWIW, I find Notepad+ does what I want (which isn't much, but is a bit
more than Notepad)


On Windows, it's VIM for the win!

  #25  
Old December 21st 15, 09:27 AM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
Jasen Betts
external usenet poster
 
Posts: 148
Default Which CR/LF & EOF text file convention does Android use?

On 2015-12-20, crankypuss wrote:
Jasen Betts wrote:

Lots of things have been around since near forever, not all of them
goodness. Null-terminated strings for example are a relic of an earlier
age, etc.. jmo obviously.


null terminated strings are crunchy goodness. they hide a bunch of
arcititecture specific details in a simple implementation.

Compatability with earlier releases is a
killer, it's largely what's forced MS-Windows to become a cesspool of
viral disease.


C doesn't promise that. GCC will default to the latest version, but
earlier standards can be requested if needed.

They still (well, last I looked, which was some time
ago) carry around interfaces from Win 3.1 that basically commit them to
being security-sieves. But they have many customers who expect their
applications to work, they lust for the money, and developers are in the
middle, having to support both old and new interfaces. Don't bother
asking me for specifics, I'm getting older and stupider every day.


I thought wine (or dosemu) was the only way to run 16-bit windows code


--
\_(ツ)_
  #26  
Old December 21st 15, 10:11 AM posted to comp.mobile.android,alt.os.linux,alt.windows7.general
chris[_4_]
external usenet poster
 
Posts: 3
Default Which CR/LF & EOF text file convention does Android use?

On 19/12/2015 12:18, Richard Kettlewell wrote:
Eef Hartman writes:
William Unruh wrote:
But yes, then one has a whole variety of possibilities.Also {LF}{CR} is
sometimes used (MACs?)


Mac OS used to use [CR] only, but I do not know if that has changed
since OS/X (which is unix-based - BSD, not SysV).


OSX uses LF.


OSX may do, but some OSX applications still use [CR]. Just noticed that
Mac Excel saves CSV files with [CRLF] #facepalm

 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 10:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.