Page 1 of 1

.csv problem with libreoffice

Posted: March 3rd, 2018, 10:11 pm
by tjh290633
I'm using LibreOffice 6.0.1.1 and have found that all my .csv files have turned into a single line of apparently Japanese characters.

Has anybody any ideas why this might be, and how to effect a cure?

TJH

Re: .csv problem with libreoffice

Posted: March 4th, 2018, 12:06 am
by Breelander
tjh290633 wrote:I'm using LibreOffice 6.0.1.1 and have found that all my .csv files have turned into a single line of apparently Japanese characters...
It's the character set that it's using to import the .csv.

I can reproduce this effect by right-clicking on a .csv and opening with my LibreOffice 4. The 'Import' screen has a 'character set' choice at the top. When I set it to 'Unicode (UTF-16)' it looks exactly as you describe - a single line of Chinese characters.

The default choice (presumably, as I've never consciously changed this) appears to be 'Western European(Windows-1252/WinLatin 1)'. This works fine as do several others, including UTF-8.

There's apparently no reliable way to determine the encoding used in any particular text document. Seems that in LibreOffice the default encoding used when importing a csv is whatever you set as the character set in the Import dialog last time you used it.

Try opening Calc, use File > Open to open any .csv, set the character set to one that works (try UTF-8) then open it. This should make UTF-8 the default from now on - as suggested here...

https://ask.libreoffice.org/en/question ... onsistent/

Re: .csv problem with libreoffice

Posted: March 4th, 2018, 2:50 pm
by tjh290633
Marvellous! That is exactly what has happened. It must have changed to UTF-16 when it was last upgraded.

Many thanks.

TJH

Re: .csv problem with libreoffice

Posted: March 4th, 2018, 3:03 pm
by Breelander
tjh290633 wrote:Many thanks.
TJH
You're more than welcome - we can't have you (of all people) unable to open your .csv files :D