[Libreoffice-bugs] [Bug 142956] New: LibreOffice Saving UTF-8 Plain Text Document as ANSI

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jun 20 14:04:07 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=142956

            Bug ID: 142956
           Summary: LibreOffice Saving UTF-8 Plain Text Document as ANSI
           Product: LibreOffice
           Version: 7.1.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: labfmfoy at guerrillamail.org

Description:
When opening a plain text document (*.txt) that has been saved with UTF-8
(without BOM) encoding, LibreOffice 7.1 now correctly recognises the document's
encoding due to the bug fix in bug 60145.

https://bugs.documentfoundation.org/show_bug.cgi?id=60145

However, when making changes in LibreOffice and saving the file (CTRL + S),
LibreOffice changes it to ANSI encoding, instead of keeping it as UTF-8
(without BOM).

I want to always save in UTF-8 (without BOM).  Saving the file by going to
[File > Save as > Text - Choose Encoding] is slow, impractical and relies on
remembering to do it.  I think LibreOffice needs a setting in [Tools > Options
> Load/Save > General] that allows users to set the default encoding they want
to use when saving plain text files – with the default setting being UTF-8
(without BOM).


Steps to Reproduce:
1) Create a new plain text document in a text editor, such as Windows Notepad
or Visual Studio Code.

2) Add the below text, which contains en and em dashes.

En dash (–) test.
Em dash (—) test.

3) Save the file with UTF-8 (without BOM) encoding, which is the default in
Windows Notepad and Visual Studio Code.

4) Open the file in LibreOffice, modify the document, then save the file [CTRL
+ S] or [File > Save].

5) Open the file in Windows NotePad.  The encoding has been changed from UTF-8
(without BOM), to ANSI.

6) Open the file in Visual Studio Code.  The text shows invalid characters if
VSCode is set to use UTF-8 (without BOM), as the file is now ANSI.

Actual Results:
LibreOffice 7.1 changes the encoding from UTF-8 (without BOM), to ANSI when
saving.

Expected Results:
LibreOffice should leave the encoding as UTF-8 (without BOM).

Or even better have an option in [Tools > Options > Load/Save > General] that
allows users to set the default encoding they want to use when saving plain
text files – with the default setting being UTF-8 (without BOM).



Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.4.2 (x64) / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210620/ee532c3f/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list