Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In trying to call importexportapi_csv_get_parsed() directly, over-riding the delimiter and enclosure strings, it seems that an empty enclosure (common in tab-delimited files), breaks the regex.
FWIW, my (simple) solution was to make my tab-delimited file look like a comma-separated with quote enclosures.
$contents = str_replace("\r\n", "\n", $contents);
$contents = str_replace("\n\r", "\n", $contents);
$contents = str_replace("\r", "\n", $contents);
$contents = "\"". str_replace("\n", "\"\n\"", str_replace("\t", "\",\"", $contents)) . "\"";
$result = importexportapi_csv_get_parsed($contents);