Ask Your Question
1

Every time I restart, it revert to Liberation Mono

asked 2020-08-29 14:31:28 +0200

Erik Helgesen gravatar image

And any Asian characters or the like turn to question marks. Why?

edit retag flag offensive close merge delete

Comments

1

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.

ajlittoz gravatar imageajlittoz ( 2020-08-29 15:41:19 +0200 )edit
1

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.

Mike Kaganski gravatar imageMike Kaganski ( 2020-08-29 17:43:22 +0200 )edit

So how do I fix it?

Erik Helgesen gravatar imageErik Helgesen ( 2020-08-30 01:50:36 +0200 )edit

Save it as DOCX using Save As, and choosing correct file format in drop-down list.

Mike Kaganski gravatar imageMike Kaganski ( 2020-08-30 08:13:39 +0200 )edit

Thanks, I have it fixed now.

Erik Helgesen gravatar imageErik Helgesen ( 2020-08-30 08:38:35 +0200 )edit
1

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!

Mike Kaganski gravatar imageMike Kaganski ( 2020-08-30 11:08:36 +0200 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2020-08-30 09:19:55 +0200

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).

edit flag offensive delete link more

Comments

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.

Mike Kaganski gravatar imageMike Kaganski ( 2021-04-08 10:35:00 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-08-29 14:31:28 +0200

Seen: 88 times

Last updated: Aug 30 '20