Exporting to PDF from Writer messes up encoding

I’m tyring to export to pdf from LOWriter. But the pdf has messed up encoding. See linked sceenshot. On the left is Writer, on the right is Okular, but the PDF is messed up everywhere, even on iPad.

Using Arch

$ uname -roms; pacman -Qi libreoffice-fresh | grep Version
Linux 4.1.6-1-ARCH x86_64 GNU/Linux
Version        : 5.0.1-1

I’ve tried searching through Settings and export settings, but did not find anything related to waht might help me.

My locale should be set properly:

$ locale -a                
C
cs_CZ.utf8
en_GB.utf8
en_US.utf8
ja_JP.utf8
POSIX
$ locale charmap
UTF-8

(removed dupe screenshot link)

I had this same problem and solved it installing the font I was using in LOW. In my case, I was using Liberation font, which seemed to be installed as I could see it inside LO, but it wasn’t.

$ pacman -Ss liberation
community/ttf-liberation 2.00.1-6
Red Hats Liberation fonts.

And installing them solved the issue completely (when making PDFs and printing):

# pacman -S ttf-liberation

As I found over the internet, this issue has nothing to do with locale settings. Hope will help. =)

‘locale -a’ gives you the options available on your system, not what your current locale is. Run the bare command if you want to see what options are currently set for your user:-

:~$ locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER=en_GB.UTF-8
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

(‘locale -a’ gives the same (wrong syntax) output on my system as you showed; above settings are correct syntax)

Now check that your user’s LO setup matches your locale:

  • (menu):ToolsOptionsLanguage SettingsLanguages

The last item is purely for the sake of sanity & should not affect PDF export. If your system is setup for UTF-8 & your font contains all the glyphs for the chars that you are using then there should be zero problems (LO is utf8 by default).

If this helps then please tick the answer (:heavy_check_mark:)

…and/or show you like it with an uptick ()