Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30450

Fields splitting on delimiter incorrectly on CSV import

XMLWordPrintable

    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      You will need to modify your CSV data to use a delimiter that never occurs in the data itself. (this is not a good workaround as the only choices for delimiter are comma, colon, semi-colon and tab; would probably be a good idea to include pipe symbol and tilde as options as well)

      Show
      You will need to modify your CSV data to use a delimiter that never occurs in the data itself. (this is not a good workaround as the only choices for delimiter are comma, colon, semi-colon and tab; would probably be a good idea to include pipe symbol and tilde as options as well)
    • Hide

      Attempting to import any csv file that contains the delimiter within the data (encapsulated by specified field enclosure character) will result in an error.

      Show
      Attempting to import any csv file that contains the delimiter within the data (encapsulated by specified field enclosure character) will result in an error.

      When I select to import a csv file in the database activity while specifying comma as delimiter and double quote as field enclosure, the following data won't import... (get unhelpful error "Unable to read the raw data from the CSV file")

      sport_name,sport_desc
      "Baseball","Played with bats, balls"

      But the following data will import...

      sport_name,sport_desc
      "Baseball","Played with bats balls"

      Seems that the explode code on line 132 in lib/csvlib.class.php is not taking into account the field enclosures.

            abgreeve Adrian Greeve
            mvidberg Marko Vidberg
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.