I have some XLS files. I was using LO for editing them and Gnumeric’s ssconvert tool for doing command line conversions of them into CSV (which I need for reasons outside the scope of this post).
For reasons of convenience/cleanliness, I would like to use LO for doing both. So now I’m trying to use this command to do the conversion:
libreoffice -env:UserInstallation=file:///home/$USER/.libreoffice-alt --headless --convert-to csv <my-xls-file>
(’-env:…’ is to ensure this LO instance does something even though I already have LO GUI open.)
This command gives almost the same results as ssconvert, except that the encoding has changed; with ssconvert output looked like this:
with libreoffice output looks like this:
According to the ‘file’ command the encoding has changed from:
UTF-8 Unicode text
to one of:
ISO-8859 text Non-ISO extended-ASCII text
(The encoding of the ssconvert-converted files is always UTF-8, but the encoding of the libreoffice-converted files varies, presumably depending on the characters in the various input files, which include text written in German, Czech, Slovak, Danish, Hungarian.)
I did find some references to the output encoding being derived from the locale, but prefixing the conversion command with:
made no difference. Anybody any ideas how to enforce UTF-8 output encoding? Thanks!
For info, this is on an Ubuntu 14.04.2 system, LO is 188.8.131.52 Build ID: 420m0(Build:2).