Bug 104970 - CSV "Text Import" dialog configuration issues with OS local and LibreOffice local
Summary: CSV "Text Import" dialog configuration issues with OS local and LibreOffice l...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Dialog
  Show dependency treegraph
 
Reported: 2016-12-28 23:20 UTC by Sintegrial Technologies
Modified: 2017-08-21 17:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample csv file (18.16 KB, text/plain)
2016-12-28 23:20 UTC, Sintegrial Technologies
Details
CSV impot dialog (25.09 KB, image/png)
2016-12-29 09:41 UTC, Sintegrial Technologies
Details
CSV import issues (49.86 KB, image/png)
2016-12-29 09:48 UTC, Sintegrial Technologies
Details
text import dialog for sample csv - utf-8, en-US, ";" separator (71.04 KB, image/png)
2016-12-29 13:57 UTC, V Stuart Foote
Details
CSV with decimal separators corrected to commas (18.16 KB, text/csv)
2017-08-20 17:08 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sintegrial Technologies 2016-12-28 23:20:31 UTC
Created attachment 129994 [details]
sample csv file

The cvs document in the attachement is being imported incorrectly into the Calc.
Consider line 44, row F: value 2544 is imported instead of 2.544
line 68, row H: value 99963 is imported instead of 99.963
line 68, row O: value 128998 is imported instead of 128.998
and so on.
Comment 1 V Stuart Foote 2016-12-28 23:57:48 UTC
Can not reproduce. All cells mentioned are correctly imported from the CSV with Semicolon separators.

On Windows 8.1 Ent 64-bit en-US with
Version: 5.2.3.3 (x64)
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 8; OS Version: Windows 6.29; UI Render: default; 
Locale: en-US (en_US); Calc: group

Please verify that you have configured the Text Import dialog "Separator Options" to _only_ use Semicolon as the field separator.
Comment 2 Sintegrial Technologies 2016-12-29 09:41:36 UTC
Created attachment 129997 [details]
CSV impot dialog
Comment 3 Sintegrial Technologies 2016-12-29 09:48:15 UTC
Created attachment 129998 [details]
CSV import issues

As you can see, the marked numbers have been imported without decimal commas.
In the original csv file, hovewer, there are point delimiters.
Comment 4 V Stuart Foote 2016-12-29 13:55:45 UTC
Again can not confirm on Windows 10 Pro 64-bit en-US with
Version: 5.2.4.1 (x64)
Build ID: 9b50003582f07ac674d6451e411e9b77cccd2b22
CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; 
Locale: en-US (en_US); Calc: group

Please provide a clip of the Text Import dialog and settings used (it pops-up when opening the .CSV file), as can be seen in attached clip--the Text import is correct with utf-8 and en-US import with Semicolon delimiter selected.

Need to know the local and language in use.
Comment 5 V Stuart Foote 2016-12-29 13:57:03 UTC
Created attachment 130006 [details]
text import dialog for sample csv - utf-8, en-US, ";" separator
Comment 6 Sintegrial Technologies 2016-12-29 14:58:24 UTC
That the strange thing because in the "Import dialog" the table seems to be correct. But in the spreadsheet, some values are wrong. 

I did one more test and replaced all the '.' in the original csv with ',' - and it seems to work afterwards. So it looks like that the import module does things wrongly only with point decimal delimiters.

I'm using German locale with german Windows 10 64 bit.
Comment 7 V Stuart Foote 2016-12-29 15:17:59 UTC
Suspect then that the MS Windows OS local setting is interfering with the CSV text import.

You can suppress from Tools -> Options -> Language Settings: "Ignore system input language" in the Enhanced section.

The import dialog should then respond correctly to settings on the panel.

Of course restore default once you've imported the CSV.

Give that a try and let us know if you get a clean import.

And if that resolves the issue, logic/UI for Text Import dialog might need a tweek to offer the ability to suppress system local during import.
Comment 8 Sintegrial Technologies 2016-12-30 20:15:29 UTC
Unfortunately, neither "Ignore system input language" option nor unchecking "Decimal separatoy key" resolved the issue.

But setting "Default locale" to English-UK seems to did the trick.

So I'm wondering why the csv import dialog is not propagating the selected locale to the spreadsheet context... Because in the dialog everything looks ok...
Comment 9 V Stuart Foote 2016-12-30 20:54:02 UTC
Just to be sure we have complete OS details, please post text from the default Help -> About LibreOffice dialog and the Summary content from the msinfo32.exe diagnostic.
Comment 10 Sintegrial Technologies 2016-12-30 21:21:09 UTC
Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
Locale: de-DE (de_DE); Calc: group


Betriebsystemname	Microsoft Windows 10 Home
Version	10.0.14393 Build 14393
Comment 11 QA Administrators 2017-06-28 12:37:18 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2017-07-27 12:03:05 UTC Comment hidden (obsolete)
Comment 13 Yousuf Philips (jay) (retired) 2017-07-27 20:43:02 UTC
Sintegrial provided the info in comment 10 that Stuart requested, so reopening as UNCONFIRMED.
Comment 14 Buovjaga 2017-08-20 17:08:37 UTC
Created attachment 135672 [details]
CSV with decimal separators corrected to commas

In the F column the values are numbers, but with incorrect decimal separator for German locale. They should be using commas. Now as they are detected to be "Number" format, the import treats 2.544 as two thousand five hundred and forty four due to German locale using period as the thousands separator.
Comment 15 Buovjaga 2017-08-21 17:24:25 UTC
(In reply to Buovjaga from comment #14)
> Created attachment 135672 [details]
> CSV with decimal separators corrected to commas
> 
> In the F column the values are numbers, but with incorrect decimal separator
> for German locale. They should be using commas. Now as they are detected to
> be "Number" format, the import treats 2.544 as two thousand five hundred and
> forty four due to German locale using period as the thousands separator.

In another report, I bumped into a more elegant way that does not require changing the .csv: https://wiki.documentfoundation.org/Faq/Calc/136/fr
So in the import dialog, change the columns with the period decimal to type "English (US)". Note that Shift and Ctrl keys work when selecting the columns in the dialog.