question about carriage returns vs line feeds in NVDA


Mohamed
 

Hi, I noticed that, depending on the text editor in use at the time, NVDA will sometimes say either "carriage return" or "Line feed" to indicate new lines. Since they seem to serve similar purposes, I wonder if there is actually a difference between the two?
Thanks.


Antony Stone
 

Yes, there is a difference between the two, and it matters when sending files
between different types of computers.

Windows uses simply Carriage Return (hex code 0d) to indicate end of line.

Macintosh computers used to use just Line Feed (hex code 0a); I don't know
whether this changed when they migrated from MacOS to OSX.

Linux and Unix computers use both together, so the hex code is 0d 0a, to
indicate end of line.

The reason for the two codes is historical - teletypes and printers used one
code to mean "return the print head to the start of the line" (that's Carriage
Return), and the other to mean "move the paper up one line" (that's line
feed).

This made it possible to print a line, return to the start without moving the
paper, and then print again over the top of the first line, used for creating
bold print, composite characters, etc.


Regards,


Antony.

On Monday 04 September 2017 at 12:56:22, Mohamed wrote:

Hi, I noticed that, depending on the text editor in use at the time,
NVDA will sometimes say either "carriage return" or "Line feed" to
indicate new lines. Since they seem to serve similar purposes, I wonder
if there is actually a difference between the two?
Thanks.
--
Under UK law, no VAT is charged on biscuits and cakes - they are "zero rated".
Chocolate covered biscuits, however, are classed as "luxury items" and are
subject to VAT. McVitie's classed its Jaffa Cakes as cakes, but in 1991 this
was challenged by Her Majesty's Customs and Excise in court.

The question which had to be answered was what criteria should be used to
class something as a cake or a biscuit. McVitie's defended the classification
of Jaffa Cakes as a cake by arguing that cakes go hard when stale, whereas
biscuits go soft. It was demonstrated that Jaffa Cakes become hard when stale
and McVitie's won the case.

Please reply to the list;
please *don't* CC me.


Aman Singer
 

Hi,

Yes, there is a difference between the two. In normal use, the difference is most obvious when sending text files between different operating systems, as between Windows and the Mac. This is far less of a problem than it was, but can still sometimes crop up. For a description of the difference which is quite clear, see
https://en.wikipedia.org/wiki/Newline
HTH,
Aman

-----Original Message-----
From: nvda@nvda.groups.io [mailto:nvda@nvda.groups.io] On Behalf Of Mohamed
Sent: Monday, September 04, 2017 6:56 AM
To: nvda@nvda.groups.io
Subject: [nvda] question about carriage returns vs line feeds in NVDA

Hi, I noticed that, depending on the text editor in use at the time, NVDA will sometimes say either "carriage return" or "Line feed" to indicate new lines. Since they seem to serve similar purposes, I wonder if there is actually a difference between the two?
Thanks.


Mohamed
 

Interestingly, NVDA seems to report them differently depending on how you come across the character. For example, if you enter a new line and erase it in Notepad, it gets reported as "Line feed", but arrowing to it results in "Carriage return". Is it possible that Windows may be reporting it differently depending on the case?

On 9/4/2017 8:24 AM, Antony Stone wrote:
Yes, there is a difference between the two, and it matters when sending files
between different types of computers.

Windows uses simply Carriage Return (hex code 0d) to indicate end of line.

Macintosh computers used to use just Line Feed (hex code 0a); I don't know
whether this changed when they migrated from MacOS to OSX.

Linux and Unix computers use both together, so the hex code is 0d 0a, to
indicate end of line.

The reason for the two codes is historical - teletypes and printers used one
code to mean "return the print head to the start of the line" (that's Carriage
Return), and the other to mean "move the paper up one line" (that's line
feed).

This made it possible to print a line, return to the start without moving the
paper, and then print again over the top of the first line, used for creating
bold print, composite characters, etc.


Regards,


Antony.

On Monday 04 September 2017 at 12:56:22, Mohamed wrote:

Hi, I noticed that, depending on the text editor in use at the time,
NVDA will sometimes say either "carriage return" or "Line feed" to
indicate new lines. Since they seem to serve similar purposes, I wonder
if there is actually a difference between the two?
Thanks.


Brian's Mail list account
 

Yes one I think is code 10 and one code 13, A carriage return is just that it moves the cursor back to the start of a line, a line feed feeds down a line, so normally one would expect both.
I go back to when we all had to drive printers directly, so you could print a page. otherwise if you just did a carriage return, you would print everything on one line.
Line feeds advanced the paper so the lines appeared below each other on the paper.

If we are not careful here we will start talking about old teleprinter codes .
I imagine all of this is these days done in the printer drivers, but as I said back in the old days of 8 bit home computers you wrote your own drivers!

Brian

bglists@...
Sent via blueyonder.
Please address personal email to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

----- Original Message -----
From: "Mohamed" <malhajamy@...>
To: <nvda@nvda.groups.io>
Sent: Monday, September 04, 2017 11:56 AM
Subject: [nvda] question about carriage returns vs line feeds in NVDA


Hi, I noticed that, depending on the text editor in use at the time, NVDA will sometimes say either "carriage return" or "Line feed" to indicate new lines. Since they seem to serve similar purposes, I wonder if there is actually a difference between the two?
Thanks.


Brian's Mail list account
 

Also when macs send plain text emails I often see =20 at the start of lines which are not there when dos or windows stuff is talking to each other.
Brian

bglists@...
Sent via blueyonder.
Please address personal email to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

----- Original Message -----
From: "Aman Singer" <aman.singer@...>
To: <nvda@nvda.groups.io>
Sent: Monday, September 04, 2017 1:49 PM
Subject: Re: [nvda] question about carriage returns vs line feeds in NVDA


Hi,

Yes, there is a difference between the two. In normal use, the difference is most obvious when sending text files between different operating systems, as between Windows and the Mac. This is far less of a problem than it was, but can still sometimes crop up. For a description of the difference which is quite clear, see
https://en.wikipedia.org/wiki/Newline
HTH,
Aman


-----Original Message-----
From: nvda@nvda.groups.io [mailto:nvda@nvda.groups.io] On Behalf Of Mohamed
Sent: Monday, September 04, 2017 6:56 AM
To: nvda@nvda.groups.io
Subject: [nvda] question about carriage returns vs line feeds in NVDA

Hi, I noticed that, depending on the text editor in use at the time, NVDA will sometimes say either "carriage return" or "Line feed" to indicate new lines. Since they seem to serve similar purposes, I wonder if there is actually a difference between the two?
Thanks.


Travis Siegel <tsiegel@...>
 

In dos (and most of the time windows) an end of line is denoted by a carriage return and a line feed one after the other (ascii 13/ascii10).  On unix type environments (including linux) it's generally just a line feed (ascii 10) that is the end of line character.  Older mac versions used just a carriage return, so it was always hit or miss as to which end of line character(s) you'd get when you picked up a text file that was cross platform.  This still happens sometimes (especially when working with languages like python, java or ruby, who are mostly cross platform). Different editors handle the end of line characters differently, though most windows editors just ignore line feeds, and treat them just like another unprintable character, which is why when opening a file created on a unix system, it all appears to be on a single line in a windows editor.  There are some editors that automatically convert line endings based on which os you're using to load the file (pico/nano does this), as does a custom editor I use sometimes when coding, but in general, on windows, the carriage return is considered the end of line character (though it still contains the carriage return and line feed pairs)

No idea why this is done (pretending the linefeed character doesn't exist, for simplicity I guess), but nonetheless, if you have a good editor, it will handle the end of line characters properly.  If you don't, then it will leave it all on a single line, and you'll need to add the carriage returns yourself.

On 9/4/2017 6:56 AM, Mohamed wrote:
Hi, I noticed that, depending on the text editor in use at the time, NVDA will sometimes say either "carriage return" or "Line feed" to indicate new lines. Since they seem to serve similar purposes, I wonder if there is actually a difference between the two?
Thanks.



Travis Siegel <tsiegel@...>
 

you're slightly incorrect in your end of line character assignment.

The original mac os (prior to OSX used carriage return (ascii 13, hex 0D).  Unix uses (and always has) linefeed (ascii 10, hex 0A), and windows/dos uses both (though generally, windows only reports the carriage return, if you use a hex editor, you will see both are present).

Hope this clears up any confusion.

On 9/4/2017 8:24 AM, Antony Stone wrote:
Yes, there is a difference between the two, and it matters when sending files
between different types of computers.

Windows uses simply Carriage Return (hex code 0d) to indicate end of line.

Macintosh computers used to use just Line Feed (hex code 0a); I don't know
whether this changed when they migrated from MacOS to OSX.

Linux and Unix computers use both together, so the hex code is 0d 0a, to
indicate end of line.

The reason for the two codes is historical - teletypes and printers used one
code to mean "return the print head to the start of the line" (that's Carriage
Return), and the other to mean "move the paper up one line" (that's line
feed).

This made it possible to print a line, return to the start without moving the
paper, and then print again over the top of the first line, used for creating
bold print, composite characters, etc.


Regards,


Antony.

On Monday 04 September 2017 at 12:56:22, Mohamed wrote:

Hi, I noticed that, depending on the text editor in use at the time,
NVDA will sometimes say either "carriage return" or "Line feed" to
indicate new lines. Since they seem to serve similar purposes, I wonder
if there is actually a difference between the two?
Thanks.