https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24330

Martin Renvoize <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #98156|0                           |1
        is obsolete|                            |

--- Comment #8 from Martin Renvoize <[email protected]> ---
Created attachment 98173
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98173&action=edit
Bug 24330: When importing patrons from CSV, automatically strip BOM from file
if it exists

We have a partner that exports UTF-8 CSV files, and is experiencing the same
thing as the author of this article:
https://www.freecodecamp.org/news/a-quick-tale-about-feff-the-invisible-character-cd25cd4630e7/

In short, Excel is inserting an invisible UTF-8 character at the start of the
file, so that the column name "cardnumber" is actually named
"\x{feff}cardnumber", causing "cardnumber" to be blank.

A simple solution is provided here:
https://stackoverflow.com/questions/24390034/remove-bom-from-string-with-perl

Test Plan:
1) Download the example.csv file
2) Attempt to import it using the patron import tool
3) Note the invalid column name error
4) Apply this patch, restart all the things!
5) Attempt the import again
6) Assuming you have a branchcode MPL and a cataegory code S, the patron should
import!

Signed-off-by: David Nind <[email protected]>
Signed-off-by: Yew Chung College Library <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to