If a csv file for importing patrons has a byte order mark, the patron import tool will not parse the header row correctly, causing additional errors for every record in the file. Byte order marks are invisible in most text editors, and created automatically by a lot of reporting tools, especially on newer versions of Windows. To reproduce: Create a valid patron import file that includes a byte order mark (Notepad++ can alter an existing file to include one, if needed). Try to import that patrons and observe the error. Now re-save the same file without the byte order mark. Try again to import the file, and observe that it succeeds. Based on my Google searches when I encountered the problem, I am confident a lot of other people have also run into this issue, but not known how to identify or resolve it. I observed this bug in 3.8. I don't have newer versions to test against, but I expect it still exists today in more recent versions.
I have had customers complaining about not being able to import data from Excel into Koha, but when I have saved the same data from LibreOffice Calc it has worked. Could this be the same problem?
I followed instructions here to create a CSV file with a byte order mark: http://blog.toshredsyousay.com/post/27543408832/how-to-add-or-remove-a-byte-order-mark I tried importing it in master and encountered no errors. I'm going to mark this as resolved.
IIRC, we later (like, a year later) determined that problem only showed up when uploading from 32-bit machines (and we only ever tested from Windows). But it is also possible that an upstream perl or apache fix has rolled out in the interim that fixed this for everyone.