summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lconvert/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist/lconvert/main.cpp')
-rw-r--r--tools/linguist/lconvert/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index 8ecdbc2..534bc11 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -80,6 +80,9 @@ static int usage(const QStringList &args)
" -of <outformat>\n"
" --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"
" --drop-tags <regexp>\n"
" Drop named extra tags when writing 'ts' or 'xlf' files.\n"
" May be specified repeatedly.\n\n"
@@ -138,6 +141,7 @@ int main(int argc, char *argv[])
Translator::LocationsType locations = Translator::DefaultLocations;
ConversionData cd;
+ cd.m_codecForSource = "Latin1";
Translator tr;
for (int i = 1; i < args.size(); ++i) {
@@ -166,6 +170,10 @@ int main(int argc, char *argv[])
if (++i >= args.size())
return usage(args);
inFormat = args[i];
+ } else if (args[i] == QLatin1String("-input-codec")) {
+ if (++i >= args.size())
+ return usage(args);
+ cd.m_codecForSource = args[i].toLatin1();
} else if (args[i] == QLatin1String("-drop-tag")) {
if (++i >= args.size())
return usage(args);