Bug 158938 - Writer loses page break character (0x0C) when utf-8 file is saved.
Summary: Writer loses page break character (0x0C) when utf-8 file is saved.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-30 20:15 UTC by Max
Modified: 2023-12-30 22:38 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max 2023-12-30 20:15:34 UTC
Hi there,
It seems page break is lost when saving as UTF-8 file in both possible situations:-
1. Page break is already in existing file (open as encoding UTF-8) text file. 
2. When inserting a page break from menu using Alt-I and selecting page break (or CTRL+ENTER).
Before saving it shows page break properly as it should. However after saving the file (again as text but choosing encoding of UTF-8) or even via save as.

It appears that page breaks are converted to CR LF pair of 0x0D and 0x0A when it is saved. It is reproducible at will. Just create a blank document, type test1, insert page break from the insert menu or using CTRL+Enter , type in next line test2 and enter another page break.
After saving this file as text with encoding of UTF-8, and reopening will no longer have page breaks; instead it will display additional blank lines.
It looks like this matches with BUG ID: 116573, 130238, 155722 though in my case it is not an RTF file but UTF-8 text file mixed with multilingual sentences from two three languages.
Comment 1 Regina Henschel 2023-12-30 22:38:35 UTC
I can confirm the problem with Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4871de96cb5e31e5ab06cf97e02e09e0e04a4de8
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

0C (form feed) is read as page break but exported as 0D0A.