I attempted to import the following (sanitized) CSV file, setting Username #1 to Fname and Username #2 to LName, and I received the following error messages, with the last two records failing to import. These fields have characters in them that were un-printable.

It'd be great if User import cleaned up these fields automatically or provided a nicer error message. I may fix this myself, I'd be interested to hear what people think it should do. Perhaps it should strip the characters out and provide a warning message that it did clean these fields.

* user warning: Duplicate entry '' for key 'name' query: INSERT INTO users (mail, timezone, status, init, pass, name, created, access) VALUES ('banswer@example.com', -18000, 1, 'banswer@example.com', '04481fb8a0fd61e277097cdf433b3775', '', 1290698567, 1290698567) in /home/drupal-6.19/modules/user/user.module on line 327.
* Unable to send e-mail. Please contact the site administrator if the problem persists.
* user warning: Duplicate entry '' for key 'name' query: INSERT INTO users (mail, timezone, status, init, pass, name, created, access) VALUES ('mpierce@example.com', -18000, 1, 'mpierce@example.com', 'ccb98af86df4bee9a3dabf6100839565', '', 1290698569, 1290698569) in /home/drupal-6.19/modules/user/user.module on line 327.
* Unable to send e-mail. Please contact the site administrator if the problem persists.

Comments

robert castelo’s picture

Status: Active » Postponed (maintainer needs more info)

The question is why did we have problems with these characters?

Can Drupal handle them?

I'd imagine Drupal's Unicode support would allow it to deal with these characters.

Do they need to be converted to Unicode before importing?

robert castelo’s picture

Version: 6.x-2.x-dev » 6.x-4.0
Status: Postponed (maintainer needs more info) » Active

Still an issue in 6.x-4.0.

How to strip out these problem characters?

gisle’s picture

Version: 6.x-4.0 » 7.x-3.x-dev
Parent issue: » #3058492: Add support for Windows-1252 character encoding

In addition to adding support for Windows-1252 character encoding, #3058492: Add support for Windows-1252 character encoding also provides meaningful error messages and error handling in the imported data is not in the expected character set.

Closing this one as a duplicate - please review parent project.

gisle’s picture

Status: Active » Closed (duplicate)