“File does not exist” error in LibreOffice on Fedora 31

Description: When trying to open a document with international characters (“ääkköset”) in its path or filename, LibreOffice fails to open it and says that the file does not exist”. This is on Fedora 31.

TL;DR: In KDE settings, set region to “American English (en_US)” and the detailed settings to “Finland (sms_FI)” or “Suomi – suomi (fi_FI)”.

Longer explanation: From the get-go this seems to be related to locales because the problem only occurs with files with international characters in their path/filename. Interestingly I could open such files when I started LibreOffice Writer from shell (Konsole/bash) with “libreoffice –writer”. I decided to check what the locale settings were in Bash and KDE. In Bash I ran “locale” which gave me basically LANG=”en_US.UTF-8″ (I forgot to save the exact output). Then I ran “locale > ~/locale.txt” from the KDE Application Launcher and checked the output file:

LANG=sms_FI.UTF-8
LC_CTYPE="sms_FI.UTF-8"
LC_NUMERIC="sms_FI.UTF-8"
LC_TIME="sms_FI.UTF-8"
LC_COLLATE="sms_FI.UTF-8"
LC_MONETARY="sms_FI.UTF-8"
LC_MESSAGES="sms_FI.UTF-8"
LC_PAPER="sms_FI.UTF-8"
LC_NAME="sms_FI.UTF-8"
LC_ADDRESS="sms_FI.UTF-8"
LC_TELEPHONE="sms_FI.UTF-8"
LC_MEASUREMENT="sms_FI.UTF-8"
LC_IDENTIFICATION="sms_FI.UTF-8"
LC_ALL=

So the locale settings were in fact different when launching from KDE vs. Bash! I tested that I could actually make the same error happen when launching LibreOffice from Bash by saying “LANG=sms_FI.UTF-8  libreoffice –writer”.

A short explanation of the rationale behind my locale settings: I prefer to use English as my system language (easier to search for error messages etc) but keep the other locale settings to Finnish, except date and time where I like the ISO 8601 date and time formats better.

I did a lot of reading on the Internet about this but in the end I decided to just set the default system locale to en_US and adjust the date/time and other settings to sms_FI. If you prefer to use Finnish month names etc. you might like to use fi_FI instead. So far nothing I care about has broken so I guess this is a suitable workaround for me.