Create users from import which have accented characters doesn't work, stacktrace with UTF-8

Description

When using a csv file to import new users (as the admin), the names are not displayed correctly. The strange thing is that the gradebook has no issues importing the users.

Am attaching ramon_user.csv which I attempted to use for the new user import and gradebook_export-dc422895-567d-4d6b-b357-d29a8ec1186e-ALL.csv which has a similar user and I added grades, then imported that file successfully.

{}Update{}: ags_users1.csv was saved as a UTF-8 csv file on Win10 and I cannot get past the Continue button after uploading the file. There is a stacktrace on the server:

Attachments

9

Activity

Show:

Andrea Schmidt October 12, 2021 at 10:03 PM

Verified on 21x: https://qa21-mysql.nightly.sakaiproject.org/, build: f2fd7d9a

Andrea Schmidt September 30, 2021 at 4:37 PM

Verified on 22x: https://trunk-mysql.nightly.sakaiproject.org/, build: d4d9a70e 

My ramon user can finally be included in the upload file!

Bernardo Garcia Vila September 8, 2021 at 3:05 AM

The ramon_user2.csv file doesn't display correctly, it but it works fine when uploading it.

The ags_users1 is encoded as UTF with BOM (a specific case where additional characters are added to the start of the file). It meant it wasn't recognising the "user id" from the starting header, missing the eids and the error trace you showed is related to that.

What I'm going to try to do is to add a "charset recognition" step plus a BOM filtering if due, so all these different files are actually processed.

Thanks for the testing!

Andrea Schmidt September 7, 2021 at 4:40 PM

The ramon_user2.csv file does not display the user's first and last name correctly.

I created another file with my regular users and the ramon user that I use for testing, saved it as a UTF-8 csv (Win10), and uploaded it to Admin > Users. I get to the point where it displays the users I'm uploading, I click Continue and the page seems to kind of refresh itself and I can't get past Continue.

Bernardo Garcia Vila September 7, 2021 at 7:56 AM

The encoding on the ramon_user.csv is not UTF-8, if you change it (uploading one) then it is uploaded fine... Not sure if this is something we should address tbh

Fixed

Details

Priority

Fix versions

21 Status

Verified

Components

Assignee

Reporter

Environment

nightly servers
Created September 4, 2021 at 4:18 PM
Updated May 27, 2024 at 4:23 AM
Resolved September 30, 2021 at 7:21 AM