Slashdot Mirror


Windows Notepad Finally Supports Unix, Mac OS Line Endings (theregister.co.uk)

Microsoft's text editing app, Notepad, which has been shipping with Windows since version 1.0 in 1985, now supports line endings in text files created on Linux, Unix, Mac OS, and macOS devices. "This has been a major annoyance for developers, IT Pros, administrators, and end users throughout the community," Microsoft said in a blog post today. The Register reports: Notepad previously recognized only the Windows End of Line (EOL) characters, specifically Carriage Return (CR, \r, 0x0d) and Line Feed (LF, \n, 0x0a) together. For old-school Mac OS, the EOL character is just Carriage Return (CR, \r, 0x0d) and for Linux/Unix it's just Line Feed (LF, \n, 0x0a). Modern macOS, since Mac OS X, follows the Unix convention. Opening a file written on macOS, Mac OS, Linux, or Unix-flavored computers in Windows Notepad therefore looked like a long wall of text with no separation between paragraphs and lines. Relief arrives in the current Windows 10 Insider Build.

Notepad will continue to output CRLF as its EOL character by default. It's not changing its stripes entirely. But it will retain the formatting of the files it opens so users will be able to view, edit and print text files with non-Windows line ends. Microsoft has thoughtfully provided an out for Windows users counting on the app's past inflexibility: the new behavior can be undone with a registry key change.

5 of 291 comments (clear)

  1. CRLF is technically correct by Anonymous Coward · · Score: 5, Insightful

    You want the carriage to return and the paper moved up by one line, not print over the last line (CR only) or continue at the current position one line down (LF only). Imagine that, Microsoft doing something correctly.

  2. Re:too little, too late by Zaelath · · Score: 4, Insightful

    Yeah, but then.. Notepad++

  3. Re:Notepad++ ? by thegarbz · · Score: 4, Insightful

    it is a must have on your usb flash drive

    It's faster to download it and run it as a portable than it is to mail a USB drive to the computer you're supporting.

    Know what's even faster? Having the default text editor able to display text correctly.

  4. Re:too little, too late by Anonymous Coward · · Score: 2, Insightful

    I call bullshit. How often do you really script something robust in 10 minutes? Do you have proper error handling, have you considered the edge cases, what about notifications of failure and logging output? It can take hours.

    For one-off jobs a shitty little brittle 10 minute script is fine, but for something of high importance 10 minutes is usually not enough.

    Personally, I don't see speed as the primary benefit... reproducibility is what I care about. I can spend 10 minutes doing a daily task... or I can spend an hour creating a script to automate that. After 6 days, the script will have paid for itself... after that it's all benefit to me.

    So please... stop with the fucking dishonesty. It's not necessary.

  5. Re:too little, too late by Anonymous Coward · · Score: 2, Insightful

    Millions upon millions of MS Windows admins 'stuck' with Linux systems?

    It's not called 'stuck' when you are too stupid to learn how to do your job which includes managing Windows, Linux, BSD, various router and switching platforms, etc... The word you're looking for is 'incompetence'. Millions upon millions of *incompetent* MS Windows admins don't know *how* to work on Linux systems....