summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lconvert
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist/lconvert')
-rw-r--r--tools/linguist/lconvert/main.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index 553ce6e..fe8d529 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -86,8 +86,11 @@ static int usage(const QStringList &args)
" --output-format <outformat>\n"
" Specify output format. See -if.\n\n"
" --input-codec <codec>\n"
- " Specify encoding for .qm input files. Default is 'Latin1'.\n"
- " UTF-8 is always tried as well, corresponding to the trUtf8() function.\n\n"
+ " Specify encoding for .qm and .po input files. Default is 'Latin1'\n"
+ " for .qm and 'UTF-8' for .po files. UTF-8 is always tried as well for\n"
+ " .qm, corresponding to the possible use of the trUtf8() function.\n\n"
+ " --output-codec <codec>\n"
+ " Specify encoding for .po output files. Default is 'UTF-8'.\n\n"
" --drop-tags <regexp>\n"
" Drop named extra tags when writing 'ts' or 'xlf' files.\n"
" May be specified repeatedly.\n\n"
@@ -139,7 +142,6 @@ int main(int argc, char *argv[])
bool verbose = false;
ConversionData cd;
- cd.m_codecForSource = "Latin1";
Translator tr;
for (int i = 1; i < args.size(); ++i) {
@@ -172,6 +174,10 @@ int main(int argc, char *argv[])
if (++i >= args.size())
return usage(args);
cd.m_codecForSource = args[i].toLatin1();
+ } else if (args[i] == QLatin1String("-output-codec")) {
+ if (++i >= args.size())
+ return usage(args);
+ cd.m_outputCodec = args[i].toLatin1();
} else if (args[i] == QLatin1String("-drop-tag")) {
if (++i >= args.size())
return usage(args);