[Libreoffice-bugs] [Bug 125971] Image import in KDE LibreOffice fails if filename contains non-latin characters

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Jun 19 09:13:12 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=125971

--- Comment #9 from Piotr <gienek.wspanialy at gmail.com> ---
(In reply to Stephan Bergmann from comment #8)
> (In reply to Jan-Marek Glogowski from comment #7)
> > I'll fix this eventually by using
> > 
> > OUString aNewURL =
> > uri::ExternalUriReferenceTranslator::create(m_xContext)-
> > >translateToInternal(toOUString(aURL.toEncoded()));
> 
> ...which, as I said on IRC, is wrong.  QUrl::toEncoded is documented
> (<https://doc.qt.io/qt-5/qurl.html#toEncoded> ) to generate a file URL whose
> "payload" is UTF-8--encoded.  But
> css.uri.XExternalUriReferenceTranslator::translateToInternal expects its
> argument to have a "payload" encoded according to the system locale (i.e.,
> osl_getThreadTextEncoding).  As QUrl provides a file URL with "payload" in
> UTF-8, which is the same format as used internally in LO, there is no need
> to map here from external to internal URL.
> 
> Lets wait for Piotr to reply why he uses LO with LANG=C.  If you have files
> in your file system whose names are encoded with UTF-8, the only reliable
> way to access them from LO is to run LO with a UTF-8 system locale (like
> LANG=pl.UTF-8).

I've had LANG=C set in ~/.bashrc because it found it to be the reliable method
to change display language to English, using Manjaro Settings Manager didn't do
the trick for some reason. Now that I have removed the LANG=C the LO works as
expected. Thank you for your help. By the way, with the help of ArchWiki I have
found that while in /etc/locale.conf the LANG variable was en_US.UTF-8 all
along, the LANGUAGE variable was set to pl_PL.UTF-8. I don't know what is the
difference between them and why MSM could't change it for me, but upon changing
and reboot my display language is English and LO still works as as expected.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190619/6d4cc26c/attachment-0001.html>


More information about the Libreoffice-bugs mailing list