{"id":102,"date":"2020-01-06T14:20:07","date_gmt":"2020-01-06T14:20:07","guid":{"rendered":"https:\/\/blog.molokaicargo.space\/?p=102"},"modified":"2020-01-06T14:20:07","modified_gmt":"2020-01-06T14:20:07","slug":"file-does-not-exist-error-in-libreoffice-on-fedora-31","status":"publish","type":"post","link":"https:\/\/blog.molokaicargo.space\/index.php\/2020\/01\/06\/file-does-not-exist-error-in-libreoffice-on-fedora-31\/","title":{"rendered":"&#8220;File does not exist&#8221; error in LibreOffice on Fedora 31"},"content":{"rendered":"\n<p><strong>Description:<\/strong> When trying to open a document with international characters (&#8220;\u00e4\u00e4kk\u00f6set&#8221;) in its path or filename, LibreOffice fails to open it and says that the file does not exist&#8221;. This is on Fedora 31.<\/p>\n\n\n\n<p><strong>TL;DR:<\/strong> In KDE settings, set region to &#8220;American English (en_US)&#8221; and the detailed settings to &#8220;Finland (sms_FI)&#8221; or &#8220;Suomi &#8211; suomi (fi_FI)&#8221;.<\/p>\n\n\n\n<p><strong>Longer explanation:<\/strong> 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 &#8220;libreoffice &#8211;writer&#8221;. I decided to check what the locale settings were in Bash and KDE. In Bash I ran &#8220;locale&#8221; which gave me basically LANG=&#8221;en_US.UTF-8&#8243; (I forgot to save the exact output). Then I ran &#8220;locale > ~\/locale.txt&#8221; from the KDE Application Launcher and checked the output file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">LANG=sms_FI.UTF-8\nLC_CTYPE=\"sms_FI.UTF-8\"\nLC_NUMERIC=\"sms_FI.UTF-8\"\nLC_TIME=\"sms_FI.UTF-8\"\nLC_COLLATE=\"sms_FI.UTF-8\"\nLC_MONETARY=\"sms_FI.UTF-8\"\nLC_MESSAGES=\"sms_FI.UTF-8\"\nLC_PAPER=\"sms_FI.UTF-8\"\nLC_NAME=\"sms_FI.UTF-8\"\nLC_ADDRESS=\"sms_FI.UTF-8\"\nLC_TELEPHONE=\"sms_FI.UTF-8\"\nLC_MEASUREMENT=\"sms_FI.UTF-8\"\nLC_IDENTIFICATION=\"sms_FI.UTF-8\"\nLC_ALL=<\/pre>\n\n\n\n<p>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 &#8220;LANG=sms_FI.UTF-8\u00a0 libreoffice &#8211;writer&#8221;.<\/p>\n\n\n\n<p><em>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.<\/em><\/p>\n\n\n\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: When trying to open a document with international characters (&#8220;\u00e4\u00e4kk\u00f6set&#8221;) in its path or filename, LibreOffice fails to open it and says that the file does not exist&#8221;. This is on Fedora 31. TL;DR: In KDE settings, set region to &#8220;American English (en_US)&#8221; and the detailed settings to &#8220;Finland (sms_FI)&#8221; or &#8220;Suomi &#8211; suomi [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,25,28,29,31,30,24,27,32],"class_list":["post-102","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-f31","tag-fedora","tag-i18n","tag-internationalization","tag-kde","tag-language","tag-libreoffice","tag-locale","tag-plasma"],"_links":{"self":[{"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/posts\/102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/comments?post=102"}],"version-history":[{"count":1,"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/posts\/102\/revisions"}],"predecessor-version":[{"id":103,"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/posts\/102\/revisions\/103"}],"wp:attachment":[{"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/media?parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/categories?post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.molokaicargo.space\/index.php\/wp-json\/wp\/v2\/tags?post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}