What can cause em dashes to revert to double hyphens

What can cause em dashes (—) to revert to double hyphens (–)? I’ve noticed this twice today. I’m saving in .odt format, using the Liberation Mono font. I’ve tried reproducing just by closing writer completely and reopening the document, but that didn’t cause any reversions.

Version: 7.2.6.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.utf8); UI: en-US
7.2.6-3
Calc: threaded

How do you create your em-dashes? Do you rely on AutoCorrect behaviour? In this case, double-check if AutoCorrect is enabled. There are two possibilities: in Replace table or in Options.
If you enter directly em-dash as U+2014 followed by Alt+x, there is no reason it transformed into a triple hyphen (a double hyphen gives an en-dash U+2013 which is narrower than an em-dash).
PS: what is your OS?

I use the compose key followed by three hyphens.

My OS is Manjaro 21.2.6

I maybe should be a little more clear. The change doesn’t happen when I type it in. It always appears correctly when I type it in, but then a half hour later, I noticed that the em dashes were replaced by two hyphens.

The compose key approach is an OS function external to LO. You should be cautious with it. Under Linux and other *Nix (MacOS is originally based on OpenBSD if I remember right) there are two keyboard managers, one for text interface (the very basic access to your computer, reminiscent of the time when there was no graphics), one for GUI and they are independent from each other. The GUI manager takes over as soon as the graphical system is initialised.

The compose key is rather part of the TUI and uses specific tables. Under GUI (X-Window system), another technique is used, xkbd, with completely different tables and algorithms. Transition to Wayland results in different tables. MacOS may use an alternate technique as its GUI is Aqua.

I suggest you check with the LO-internal input method where you type “U+2014” (without quotes) followed by Alt+x. Under MacOS, the Alt modifier may be another key.

The strange phenomenon is the delayed transformation.

1 Like

I haven’t noticed any more problems. Thanks @ajlittoz