Closed (outdated)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jul 2012 at 22:51 UTC
Updated:
26 Nov 2025 at 14:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jibus commentedOk, i juste tested with a mysql db, i have the same result.
In fact, it worked if we use a dot instead of a comma in the csv file.
Comment #2
bobodrone commentedJust a thought: Is comma a forbidden character when it comes to float values in CSV files?
I just downloaded a huge csv file which uses comma as float separator character instead of dot or period and it uses semicolon as separator between the fields.
I noticed that there is a function inside mappers/field.inc that don´t think that a value with a comma (float in this case) is valid as a numeric value but it could actually be that. The value "3,14159" is therefore not considered to be a valid numeric value but "3.14159" is. The other part is thatwe can not store a float value with a comma in the db, we need to convert it to a period instead.
My patch looks for a numeric value that have a comma surrounded by digits, then it is a float value and it need to convert the comma to a dot/period to be possible to store in the database.
This patch solves that issue.
/ Bobodrone
Comment #3
bobodrone commentedReopen the issue.
Comment #4
bobodrone commentedSlightly better regex, where it checks the beginning of the string as well. :)
Comment #5
twistor commentedCan you give this a try?
Comment #6
twistor commentedThis doesn't apply anymore.
Comment #7
condor616 commentedRerolled the patch for #5
For list_float the solution doesn't work yet.
Comment #8
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.