Menu

Converting .tsv files in UTF-16

sai-mike
2017-06-23
2017-07-03
  • sai-mike

    sai-mike - 2017-06-23

    I am trying to convert log files from an industrial device to .ods spreadsheets. If I run file -i on the original files it reports "text/plain: charset=utf-16le" and csv2odf fails when run using the original file. I can convert a file using LibreOffice Calc to UTF-8. If I run file -i on the converted file it reports "text/plain: charset=us-ascii" and csv2odf runs fine. Is it possible to use csv2odf with utf-16le input files?

     
  • Larry Jordan

    Larry Jordan - 2017-06-23

    Currently the program does not support that encoding. It is a use case I had not thought of. I am going to research the possibility of adding an option to specify csv file encoding.

     
  • sai-mike

    sai-mike - 2017-06-23

    Great! We deal with a lot of equipment that is manufactured in Asia and it seems to use utf-16 for internal logging to support asian language text. If csv2odf can process that character set then that is one less conversion I need to automate in going from raw log files to business reports.

     
  • Larry Jordan

    Larry Jordan - 2017-07-02

    sai-mike,

    You can try version 2.09. It has the new option --csv-encoding. You would use it like --csv-encoding=utf-16le.

    Let me know if it does not work as expected.

    Thanks.
    Larry

     
  • sai-mike

    sai-mike - 2017-07-03

    Tested with my log files - works great. Thanks for making that addition.

     
  • Larry Jordan

    Larry Jordan - 2017-07-03

    Great. Glad it worked.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.