LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-07-2018, 12:03 PM   #1
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,191

Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
LOCalc - not recognizing English month names in CSV import


I am opening a CSV file. In the import CSV dialog I mark the date column and tell Calc it is a date in DMY format.

Using LibreOffice 4.3.3 on Debian Jessie.

After importing this is displayed:
"23 Jul 2018" -> 7/23/2018
"23 Mar 2018" -> 23 Mar 2018

So the first line containing Jul is converted to a date, while the line containing Mar remains text.

Actually, the lines with the month names Jan, Feb, Apr, Jun, Jul, Aug, Sep, Nov and Dec are converted correctly to dates. Line containing Mar, May and Oct are not.

When I edit the CSV file and replace those with the Dutch names Maart, Mei and Okt the conversion is correct. The other abbreviations are equal in Dutch and English.

Now I live in the Dutch Kingdom, but my computer doesn't know it. Debian is US, all applications are US, locale is en_US. My CSV file is English. Time is set to UTC. I did not load any additional language modules for spell check or so.

In Calc I have set the language settings:
User Interface: Default - English (USA)
Locale setting: Default - English (USA)
Enhanced language support: Ingnore system input language.

Now why is it that LOCalc insists of using Dutch month names while converting a CSV file?

jlinkels

Last edited by jlinkels; 09-07-2018 at 12:11 PM.
 
Old 09-07-2018, 12:32 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,448
Blog Entries: 13

Rep: Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762
Somehow it knew. That's the only explanation I can see.

Perhaps your computer used NTP to determine where you are somehow.

Perhaps when you installed it detected your geographical location. Perhaps your browser detected this.
 
Old 09-08-2018, 07:58 AM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,191

Original Poster
Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
It must be something like that. Highly annoying. I am afraid this is the future with all that highly praised Artificial Intelligence. I hate it. I clearly told Calc that everything should be US or en_US and still it knows better. Based on some mysterious information.

See, I am in the Dutch kingdom, but not in the Netherlands and not in EU. It means that the language is not Dutch, the currency is not Euro but $. The decimal separator is '.' And the date format is M/D/Y or D/M/Y, depending on who you are talking to. (Now that is highly annoying as well, so I use ISO date format)

When I was trying various import options in Calc, I noticed that numbers were not imported correctly either. Numbers containing a decimal point were considered text. Only numbers with a decimal comma are considered numbers.

The weird thing is that when I enter something in Calc, the decimal separator must be '.', not ',' and month names must be English. It is only when importing CSV the Dutch locale settings are used. I can't think of anything more stupid.

Anyway, thanks to the extremely helpfulness and user friendlyness of Calc I now run all import files through a sed script.

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Import contacts from csv file to android phone AwesomeMachine General 7 08-23-2018 09:12 PM
Thunderbird import mail in .csv format westside Linux - Software 3 06-07-2017 03:16 AM
How to import CSV into MySQL GreenSkyChris Linux - Server 6 11-23-2010 07:20 AM
LXer: CodeWeavers CEO names himself employee of the month for 175TH consecutive month LXer Syndicated Linux News 3 08-13-2010 05:55 PM
Recognizing network names ivanatora Linux - Networking 4 10-03-2003 03:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration