LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 11:03 AM   #1
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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 11:11 AM.
 
Old 09-07-2018, 11:32 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
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, 06:58 AM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Original Poster
Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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



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 08:12 PM
Thunderbird import mail in .csv format westside Linux - Software 3 06-07-2017 02:16 AM
How to import CSV into MySQL GreenSkyChris Linux - Server 6 11-23-2010 06:20 AM
LXer: CodeWeavers CEO names himself employee of the month for 175TH consecutive month LXer Syndicated Linux News 3 08-13-2010 04:55 PM
Recognizing network names ivanatora Linux - Networking 4 10-03-2003 02:19 AM

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

All times are GMT -5. The time now is 10:53 PM.

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
Open Source Consulting | Domain Registration