The second argument of Systemcall::startscript is supposed to be encoded

in the filesystem encoding, i.e., the local 8 bit encoding.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39760 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-09-25 16:38:51 +00:00
parent b53445e6cd
commit a749b73d95
2 changed files with 6 additions and 5 deletions

View File

@ -212,7 +212,7 @@ int Systemcall::startscript(Starttype how, string const & what,
string const & path, bool process_events)
{
string outfile;
QString cmd = toqstr(parsecmd(what, outfile));
QString cmd = QString::fromLocal8Bit(parsecmd(what, outfile).c_str());
SystemcallPrivate d(outfile);
@ -257,7 +257,7 @@ SystemcallPrivate::SystemcallPrivate(const std::string& of) :
if (!out_file_.empty()) {
// Check whether we have to simply throw away the output.
if (out_file_ != os::nulldev())
process_->setStandardOutputFile(toqstr(out_file_));
process_->setStandardOutputFile(QString::fromLocal8Bit(out_file_.c_str()));
}
connect(process_, SIGNAL(readyReadStandardOutput()), SLOT(stdOut()));

View File

@ -40,9 +40,10 @@ public:
/** Start child process.
* The string "what" contains a commandline with arguments separated
* by spaces. The string "path" contains the path to be prepended to
* the TEXINPUTS environment variable. Unset "process_events" in
* case UI should be blocked while processing the external command.
* by spaces and encoded in the filesystem encoding. The string "path"
* contains the path to be prepended to the TEXINPUTS environment
* variable and encoded in utf-8. Unset "process_events" in case
* UI should be blocked while processing the external command.
*/
int startscript(Starttype how, std::string const & what,
std::string const & path = empty_string(),