[Koha-bugs] [Bug 5379] import_borrowers.pl fails with db insert/update errors
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Nov 16 15:55:47 CET 2010
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5379
--- Comment #14 from Chris Nighswonger <cnighswonger at foundations.edu> 2010-11-16 14:55:46 UTC ---
The problem is most certainly due to poorly worded help.
According to RFC-4180:
If double-quotes are used to enclose fields, then a double-quote appearing
inside a field must be escaped by preceding it with another double quote. For
example:
"aaa","b""bb","ccc"
We are essentially embedding a CSV inside of a single field of another CSV, so
we must properly escape our double quotes. This means in a plain text editor
our patron attribute field should follow this form:
"""ATTRIB_1:VALUE_1"",""ATTRIB_2:VALUE_2"",""ATTRIB_3:VALUE_3"",...
""ATTRIB_N:VALUE_N"""
In a spreadsheet editor this would be:
""ATTRIB_1:VALUE_1"",""ATTRIB_2:VALUE_2"",""ATTRIB_3:VALUE_3"",...
""ATTRIB_N:VALUE_N""
My testing shows that this syntax works.
NOTE: Excel *does not* double quote fields afaict, so it may be necessary to
follow the first example when using Excel. This needs to be tested.
I will follow up with a patch to clarify the help in this tool.
--
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the Koha-bugs
mailing list