Skip to content
Snippets Groups Projects
Commit e98ef6b4 authored by Franz Glauber Vanderlinde's avatar Franz Glauber Vanderlinde
Browse files

Issue #1407670 by Ivan Simonov, GaëlG, franz: drupal_strlen() doesn't work...

Issue #1407670 by Ivan Simonov, GaëlG, franz: drupal_strlen() doesn't work when parsing multibyte strings in CSVParser.
parent 255005b7
No related branches found
No related tags found
No related merge requests found
...@@ -214,7 +214,9 @@ class ParserCSV { ...@@ -214,7 +214,9 @@ class ParserCSV {
$currentField = ''; $currentField = '';
$fields = array(); $fields = array();
while ($currentIndex <= drupal_strlen($line)) { // We must use strlen() as we're parsing byte by byte using strpos(), so
// drupal_strlen() will not work properly.
while ($currentIndex <= strlen($line)) {
if ($quoted) { if ($quoted) {
$nextQuoteIndex = strpos($line, '"', $currentIndex); $nextQuoteIndex = strpos($line, '"', $currentIndex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment