We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

How do i specify an input character coding for a convert-to command line usage? [closed]

asked 2013-02-23 18:29:08 +0200

stutek gravatar image

updated 2013-11-05 23:01:48 +0200

manj_k gravatar image

How do I specify an input encoding for a file I want to convert in a headless mode:

libreoffice --headless --convert-to csv test.xls

This command messes up the non-ascii characters of the windows-1250 character set. Google-ing around, I found a hint that LibreOffice tries to import iso-8859-1 character coding by default and thus messes up the caracters.

The GUI operation of opening an xls file and saving as a .csv does translate the non-ascii characters corectly.

Please help.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-26 15:03:54.500914

2 Answers

Sort by » oldest newest most voted

answered 2013-02-23 19:48:43 +0200

qubit gravatar image

Hi @stutek,

I'm not aware of a way to specify a particular character encoding when importing/converting files on the command line, but it does sound like a useful feature.

Unoconv might give you the flexibility that you desire, however you will have to install a separate program. Here are some quick notes from Unoconv regarding specifying the encoding for filters:

The default import filter for many imports...accepts as the only argument the input encoding-type, so if you require utf-8 (76) you can do:

-i FilterOptions=76

If the Unoconv option doesn't work for you, please file an enhancement bug and provide as much information about this new feature as possible. Don't forget to mark your bug as an 'enhancement'. The QA team will be happy to help you triage your feature request in the bugtracker.

Please post a link to any bugs you file in a comment below using the format "fdo#123456".


edit flag offensive delete link more

answered 2013-03-07 11:49:06 +0200

stutek gravatar image

updated 2013-03-07 11:49:42 +0200

@qubit I opened a bug report. Can't comment on your post since i do not have enough karma, so the link is here:


edit flag offensive delete link more


@stutek, Thanks for the report! You now should have enough karma to be able to comment on Answers :-)

qubit gravatar imagequbit ( 2013-03-07 12:21:29 +0200 )edit
manj_k gravatar imagemanj_k ( 2013-11-05 23:01:23 +0200 )edit

Question Tools


Asked: 2013-02-23 18:29:08 +0200

Seen: 12,090 times

Last updated: Mar 07 '13