Created attachment 153526 [details]
Example ODT file containing Shift+Enter line breaks
According to the help files, Shift+Enter inserts a line break without making a new paragraph. I use this feature a lot, often for a few short items when I don't want to use a bullet list.
However I found out that if I export an ODT file containing such line breaks to TXT format on Windows, I get text files with mixed LF and CR+LF line breaks. The normal - with new paragraphs - line breaks export to the expected Windows CR+LF line breaks, while the Shift+Enter line breaks export to LF-only line breaks.
This is problematic because notepad.exe doesn't recognize LF-only line breaks, and as a result my list of short items all end up in one single line when viewed in Notepad.
This most likely doesn't affect Linux as it uses LF line breaks only. I'm not sure what the behavior is on Mac.
My LO version info:
Version: 188.8.131.52 (x64)
Build ID: 684e730861356e74889dfe6dbddd3562aae2e6ad
CPU threads: 2; OS: Windows 10.0; UI render: default; VCL: win;
Locale: zh-CN (zh_CN); UI-Language: en-US
How do you open txt-file? If I reopen file in Windows, I can't reproduce it?
Version: 184.108.40.206 (x64)
Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win;
Locale: de-DE (de_DE); UI-Language: en-GB
(In reply to Dieter Praas from comment #1)
> How do you open txt-file? If I reopen file in Windows, I can't reproduce it?
As I mentioned in the original report, the problem is most apparent when the TXT file is opened with notepad.exe (Windows Start Menu -> Windows Accessories -> Notepad). Wordpad.exe seems to be able to handle LF-only line breaks.
Regardless, even if the file displays fine in many programs, it's never a good idea to mix CR-LF and LF-only line breaks in the same file.
I confirm the described behaviour, but I'm not so firm in that topic, that I can assess, if it is a bug or not. I hope, somebody else can help.
Hmm, not sure how OP has configured the MS notepad.exe, but its default settings with or without 'word wrap' enabled does distinguish and show the <LF> and <CR><LF>
As does wordpad.exe.
As does notpad++.exe
As does gvim.exe
In short, not seeing an issue with our handling of <CR> vs <CR><LF>. While doing anythiing different with the distinction would in fact cause problems.
Created attachment 153773 [details]
Screenshot of the TXT file opened in gVim
(In reply to V Stuart Foote from comment #4)
> Hmm, not sure how OP has configured the MS notepad.exe, but its default
> settings with or without 'word wrap' enabled does distinguish and show the
> <LF> and <CR><LF>
My MS Notepad is definitely in the default setting. AFAIK there is no setting in notepad for different kind of line breaks, and the "word wrap" setting will never make two or more lines displayed in one line. The MS notepad behavior of not recognize LF-only line break has a long history and is well documented.
> As does gvim.exe
While gVim indeed displays the file with line breaks, it does highlight the fact that there are both CR+LF and LF-only line breaks in the file, by showing the <CR> character as "^M", see attached screenshot.
> doing anythiing different with the distinction would in fact cause problems.
What kind of problems do you forsee?