Bug 10117 - Byte Order Mark breaks Patron Import
Summary: Byte Order Mark breaks Patron Import
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 18:44 UTC by Joel Coehoorn
Modified: 2017-06-14 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Coehoorn 2013-04-25 18:44:15 UTC
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.
Comment 1 Magnus Enger 2013-08-01 12:07:46 UTC
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?
Comment 2 Owen Leonard 2016-06-23 13:48:09 UTC
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.
Comment 3 Joel Coehoorn 2016-06-23 14:11:27 UTC
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.