Author Topic: Windows Line endings (CRLF)  (Read 1216 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1710
  • Hero Points: 166
  • Text
Windows Line endings (CRLF)
« on: May 22, 2017, 11:23:29 pm »
When a file is loaded with CRLF line endings encoding, Slick always breaks lines on  (LF) and (CRLF), but not on (CR) alone.

It should not break on (LF) alone.

Related issue I found is that when Slick loading a file and deciding which line end style, it seems to pick just the first one. I've got some files where the file line is terminated with (LF) only, but all other lines are (CRLF) -- and slick loads these as  Unix/Mac(LF).


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4616
  • Hero Points: 367
Re: Windows Line endings (CRLF)
« Reply #1 on: May 23, 2017, 03:20:05 pm »
With the current algorithm, SlickEdit does not handle files with mixed line breaks. It only checks the first chunk and then assumes the platform default line endings.

If you have a trashed file like this, you can convert it with the following steps:

  Use the Open dialog to open the file and choose "Windows/DOS (CRLF)"
  Use the Save As dialog and choose Windows/DOS (CR/LF) or Unix/MacOS(LF) depending on what you want.

If you prefer not to convert your file but want opened files to be treated as DOS line endings, set the Options>Languages>[language|all languages]>File Options>Line format to "DOS/Windows (CRLF)"