News for hackers. Stuff that matters.
Re:Microsoft is updating Notepad by KwanEsq on Thursday July 12, 2018 @05:19PM (#17518708)
I think the line endings support is going to be the most valuable addition, that's definitely bitten me when I used to use Windows.
Re:Microsoft is updating Notepad by stephengillie on Thursday July 12, 2018 @06:51PM (#17519278)
Parsing can be "fun", trying to figure out if text is ended with \n, \r, or both.
Re:Microsoft is updating Notepad by marcosdumay on Thursday July 12, 2018 @07:07PM (#17519358)
Unix's \n, Windows' \r\n, and older Mac's \n\r.

Deciding whether a line-end terminated when reading from a network is kinda hard...

Re:Microsoft is updating Notepad by Avery3R on Thursday July 12, 2018 @07:10PM (#17519373)
older macs are just \r not \n\r
Re:Microsoft is updating Notepad by nojvek on Friday July 13, 2018 @12:16AM (#17520480)
\r?\n regex?
Re:Microsoft is updating Notepad by bmn__ on Friday July 13, 2018 @04:06AM (#17521253)
Re:Microsoft is updating Notepad by marcosdumay on Friday July 13, 2018 @01:23PM (#17524868)
So, you take a `\r` from the network. So, do you wait for a `\n` before returning the line?
Re:Microsoft is updating Notepad by rhencke on Friday July 13, 2018 @04:39PM (#17526505)
You wait to peek the next byte, or EOF, and then make the choice.
Re:Microsoft is updating Notepad by marcosdumay on Saturday July 14, 2018 @12:23PM (#17530930)
Line protocols do not transmit EOF (and the problem is on each line anyway). And the next byte may only come after you write something on the socket.