I’m using LibreOffice 5.2 and Debian 9. I have UTF-8 tab separated value (.tsv) file in this format (note that \t = tab and \s = space):
col1\tcol2\tcol3
foo1\tbar1\s\tbar2\s
foo2\t\s\t\s
LibreOffice Calc will read it like this:
col1\tcol2\tcol3
foo1\tbar1\s\tbar2\s
foo2\t\s\t[EITHER NOTHING OR RANDOM ASIAN SYMBOL(S) THAT CHANGE EACH TIME]
Notice that it will preserve spaces in all cases EXCEPT when the space is in the last column and is the only thing present (i.e. not preceded or followed by any symbols). When reading text delimited files in R, removing trailing spaces is the default behavior, but one can turn this off by setting “strip.white” to FALSE. I have not found any way to do this in LibreOffice. Is there any way to do that, and if not, could it be added?