And any Asian characters or the like turn to question marks. Why?
How do you expect we can answer such a question? Read these guidelines and edit your question to provide minimal technical information.
Answers are reserved for solutions, don’t use one.
I bet that the missing information is:
I use Windows. I created a new DOCX right-clicking a directory in Explorer (or desktop) and using New menu.
And that’s tdf#120822.
So how do I fix it?
Save it as DOCX using Save As, and choosing correct file format in drop-down list.
Thanks, I have it fixed now.
Please note comment by @ajlittoz. Although I happened to know the issue you were talking about, that is just a coincidence, and lacking someone knowing precisely the matter, anyone would be unable to understand your issue. Please always do your best to make your questions as good as possible. Thanks!
What is it?
Your file ends with .docx, and you think it’s a DOCX file; but in fact it’s a plain text file. This is shown in the warning shown at saving time (“This document may contain formatting or content that cannot be saved in the currently selected file format “Text””); doesn’t allow to save any kind of formatting; and only saves the characters that may be represented in the 8-bit encoding corresponding to your current LibreOffice locale (and any character not representable in that 8-bit encoding is turned into question marks). That is tdf#120822 (NOTOURBUG).
How?
You had created the DOCX initially on Windows right-clicking a directory in Explorer (or desktop) and using New menu. (This is an educated guess mentioned in my comment to the question, that turned to be true from OP responses.)
Why?
The context menu item used initially for creation of the file - New Microsoft Word Document
- is not LibreOffice’s; it’s an element created by MS Office. The specifics of that menu item is that it creates a zero-byte file, which is not a valid DOCX file (the latter is a ZIP with a complex internal structure; and even an empty valid DOCX is not 0 bytes). MS Word knows that when it opens 0-byte DOCX, it means that it needs to create a new valid document - that’s a private MS Office’s convention. The DOCX
file type happens to be associated on your system with LibreOffice - so when you double-click on that 0-byte file, it’s opened in LibreOffice. LibreOffice doesn’t have that non-standard convention regarding 0-byte files; so it uses its normal file type detection mechanism; and the only matching type is plain text. So the DOCX is opened in the component responsible for handling TXT files (Writer), and the type is remembered for following default saving. At the Save
(Ctrl
+S
) time, the remembered format is used (after the warning), and everything not representable in the format is naturally discarded.
We have a similar/same problem that MS has solved using that trick by special-handling zero-length files. There’s a discussion if we need to implement this special handling. See tdf#123476 and description of tdf#133661.
What to do?
Make sure you are saving your file using proper file type: use File
|Save As
, and explicitly choose the correct type in the corresponding drop-down list. Better use LibreOffice’s native ODF type (.odt
).
And it has changed since version 7.1 (see tdf#123476): LibreOffice now treats zero-byte files based on their extension, to avoid such confusion.