On Tue, Jun 10, 2014 at 08:59:18PM +0200, Claudius Marpa Heine wrote: > Hi > > > > > Have you tried getting rid of the umlaut in the logo's filename (and > > in the related inset in lyx)? > > > > Thanks, that did it. > > So is it a bug that it works in the UI and not in the terminal? > Shouldn't it support unicode paths in both cases? > I thought it worked on a previous version.
Yes, it works with LyX 2.0. Seemingly, the locale is not correctly set in LyX 2.1 and 2.2 when the GUI is not used. Indeed, using the attached patch, when launching LyX normally (such that the GUI appears), I get the following output: charset: ANSI_X3.4-1968 charset: ANSI_X3.4-1968 charset: UTF-8 charset: UTF-8 charset: UTF-8 Instead, when executing a batch command, I see: charset: ANSI_X3.4-1968 charset: ANSI_X3.4-1968 charset: ANSI_X3.4-1968 and then it fails if file names contain non-ascii characters. However, it is weird that compiling LyX 2.1 or 2.2 with Qt5, then the batch command succeeds, even if the above output is unchanged. Go figure... -- Enrico
diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index f6c8433..93e447e 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -177,6 +177,7 @@ frontend::Application * createApplication(int & argc, char * argv[]) } +#include <langinfo.h> void setLocale() { QLocale theLocale; @@ -192,6 +193,7 @@ void setLocale() Messages::guiLanguage((code == "C") ? "en_US" : code); QLocale::setDefault(theLocale); setlocale(LC_NUMERIC, "C"); + lyxerr << "charset: " << nl_langinfo(CODESET) << endl; }