This module works great!

But if I try to upload a CSV exported by a Mac, it cannot recognize the new line character, since is not in UNIX format.
I tried to insert this statement in the module
ini_set("auto_detect_line_endings", true);
just before the fgetcsv function
as stated here http://us2.php.net/manual/en/filesystem.configuration.php#ini.auto-detec...
but it didn't help.

Any other with the same problem?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aperez2242’s picture

Hi,
I'm having the same problem and I make some advances using:
ini_set('auto_detect_line_endings', true);
on line 484, just before:
if (($handle = fopen($file->uri, "r")) !== FALSE) {
It handles all columns right but the first one...

I'll continue working with it.

aperez2242’s picture

So... I finally edit the file and set the delimiter to " ; " and save the file as CSV for Windows.

It works perfectly :)

But this should be fixed in the next version to support all characters.

brenk28’s picture

Issue summary: View changes
FileSize
656 bytes

Here is a patch that does the ini_set as described in #1. Patch is against 7.x-2.3.

vitalie’s picture

What about settings.php? ini_set sounds like settings.php.

jenlampton’s picture

Status: Active » Needs review
FileSize
1.33 KB

This fix solves the problem for me as well. Thank you @pabloid and @aperez2242 for the recommendation, and @brenk28 for the patch. I have added an additional change and that is to return the setting to it's previous value value after we parse the CSV file. I would hate changing that setting to cause other problems.

  • jenlampton committed 11358ea on 7.x-2.x
    Issue #1514710 by brenk28, aperez2242, pabloid: recognize the Classic...
jenlampton’s picture

Status: Needs review » Fixed

This fix will go into the next release of tablefield.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.