Hi,
Lazarus internally has a tool for generating po files from rst files, much like rstconv. For the convenience of translators using a po-editor, the files generated by Lazarus start with:
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
The important part is: charset=UTF-8
Then the po-editor knows in what encoding it should read and write the file.
Attached patch adds an option -c XXX for the conversion to .po files to rstconv. It adds the above header to the .po file and you can specify what the charset should be. I was not sure what option name I should take, -c is used in the other output formats already, but so -s and -h (for header) is not possible too.
In our scripts to do the conversion outside Lazarus from the command line, we will call it like
rstconv -c UTF-8 -i bla.rst -o bla.po
Please, review, comment and/or apply the patch.
Vincent
