diff --git a/src/phantomjs.cpp b/src/phantomjs.cpp index 9152c56d..3ad2f5f8 100644 --- a/src/phantomjs.cpp +++ b/src/phantomjs.cpp @@ -203,7 +203,7 @@ void Phantom::execute(const QString &fileName) exit(1); return; } - m_script = file.readAll(); + m_script = QString::fromUtf8(file.readAll()); file.close(); m_page.mainFrame()->evaluateJavaScript(m_script); @@ -341,6 +341,8 @@ int main(int argc, char** argv) return 1; } + QNetworkProxyFactory::setUseSystemConfiguration(true); + QApplication app(argc, argv); app.setWindowIcon(QIcon(":/phantomjs-icon.png"));