Bug 143093 - Windows File Explorer created docx file, edited in libreoffice Writer, and Ctrl-S saved, ends up with question marks
Summary: Windows File Explorer created docx file, edited in libreoffice Writer, and Ct...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 143092 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-27 05:45 UTC by Raghu
Modified: 2022-11-02 09:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Image showing 0 kb file created when doing New->Microsoft Word Document (39.18 KB, image/jpeg)
2021-06-27 18:07 UTC, Raghu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghu 2021-06-27 05:45:16 UTC
Steps to reproduce.
Open windows file explorer
Right click on empty space and choose New -> Microsoft Word Document. Specify some file name, with .docx extension.
Now open this empty file using libreoffice Writer.
Change to a different input language ( I tries sanskrit, tamil).
Enter some characters in this other language. Save the files as .docx itself.
Now, re-open the file using libreoffice Writer.
Entered characters are showing as ? plain question marks.
Comment 1 Raghu 2021-06-27 05:50:02 UTC
Main point - save by doing Ctrl-S
Comment 2 Raghu 2021-06-27 06:29:55 UTC
*** Bug 143092 has been marked as a duplicate of this bug. ***
Comment 3 [REDACTED] 2021-06-27 08:59:33 UTC
(In reply to Raghu from comment #0)

> Right click on empty space and choose New -> Microsoft Word Document.
> Specify some file name, with .docx extension.

Does this action really create a .docx document (which would be a ZIP container) or does it just create a simple text file having 

- no content
- a (real) size of 0 bytes 
- the .docx extension only (

(If that's the case such file wont be a real .docx file)

Due to lack of having a MS Office installation on my system, could you please attach the file created by the 2 steps above and which has not been edited using LibreOffice Writer.
Comment 4 Raghu 2021-06-27 17:59:11 UTC
It is having 0 bytes. Please see attached.
Comment 5 Raghu 2021-06-27 18:01:35 UTC
Well, I could not attach file because this bug system complains that it is an empty file, and is not allowing me to attach.
Comment 6 Raghu 2021-06-27 18:07:29 UTC
Created attachment 173234 [details]
Image showing 0 kb file created when doing New->Microsoft Word Document
Comment 7 Raghu 2021-06-27 18:08:09 UTC
I have attached an image in the windows folder explorer instead.
Comment 8 Raghu 2021-06-27 18:16:54 UTC
Since there is no warning about this empty .docx file in libreoffice word when opening, editing, or Ctrl-S saving, the action of losing content is done so silently.
Libreoffice writer is treating the empty file as a .txt file, but that is not apparent to the user. 
This can be observed by using the "Save As" option. In the case of empty .docx file, the Save As dialog of Libreoffice Writer shows file type of .txt. In case of a non-empty .docx file, it shows file type of .docx. 
So I think that Libreoffice Word could look at the existing file extension of .docx when it is saved by using Ctrl-S, and not treat it as a text file.
Comment 9 Buovjaga 2022-04-29 15:13:09 UTC
I don't have this New -> Microsoft Word Document entry in my Explorer context menu. How can I add it?
Comment 10 QA Administrators 2022-10-27 03:32:38 UTC Comment hidden (obsolete)
Comment 11 Raghu 2022-11-02 09:47:51 UTC
I tried with version 7.1.6.2 of LibreOFfice today.
The problem does not occur.
This ticket may be closed.