Add command-line option to set terminal output encoding

1.3
execjosh 2011-08-17 03:49:12 +09:00
parent c3d7b2e918
commit 6254c84717
2 changed files with 5 additions and 0 deletions

View File

@ -133,6 +133,10 @@ Phantom::Phantom(QObject *parent)
cookieFile = arg.mid(10).trimmed();
continue;
}
if (arg.startsWith("--output-encoding=")) {
Registry::terminal().setEncoding(arg.mid(18).trimmed());
continue;
}
if (arg.startsWith("--")) {
Registry::terminal().cerr(QString("Unknown option '%1'").arg(arg));
m_terminated = true;

View File

@ -9,3 +9,4 @@ Options:
--disk-cache=[yes|no] Enables disk cache (at desktop services cache storage location, default is 'no').
--ignore-ssl-errors=[yes|no] Ignores SSL errors (i.e. expired or self-signed certificate errors).
--local-access-remote=[yes|no] Local content can access remote URL (default is 'no').
--output-encoding Sets (if available) the encoding used for terminal output (default is 'utf8').