Convert hundreds of files to ODT - programatically

LibreOffice 4.2.4
Mac OS X 10.7.5

I have a need to convert multiple files (may be 100+) to ODT format.

Ideally we would like to start soffice in headless and invisible mode and close it when done.

I was thinking that we should talk to soffice via a socket.

I am doing all this in C++ and was wondering are there any examples of this being done already. Is there a method on an interface that does the conversion for you or do I need to open a document and save it programatically. Currently we call soffice in headless, invisible mode and use the --convert-to parameter but this is slow and requires start up and shutdown time.

After looking at the python unoconv, the Java and C++ samples from the LibreOffice SDK I finally got some documents converted in a proof of concept C++ program. However I am now failing on txt files with chinese characters in it. I can view the file on Mac OS X via Finder and TextEdit - why cannot LibreOffice just open it?

Please edit this response to indicate exactly what is failing e.g., link to a screenshot, example file, etc. Chinese can sometimes use different character encodings. There are a few related questions on this site regarding this type of issue.