[Bug 4973] New: process_koc.pl fails to process returns because of \r
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4973 Summary: process_koc.pl fails to process returns because of \r Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: magnus@enger.priv.no QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com Estimated Hours: 0.0 I was having trouble processing koc-files with /cgi-bin/koha/offline_circ/process_koc.pl. I got this message, both for items that were on loan and items that were not on loan: "Warning: Unable to determine patron from item barcode (71556236). Cannot check in." 71556236 is a valid barcode. This hack on around line 192 of offline_circ/process_koc.pl fixes it: sub parse_command_line { my $command_line = shift; chomp($command_line); $command_line =~ s/\r//g; Comments from IRC: [20:04] pianohack: magnus: Are these windows-style \r\n lines? [20:04] magnus: pianohack: probably [20:04] pianohack: magnus: All chomp does is remove the line ending on the platform you're running on [20:04] pianohack: linux server, windows client? [20:04] magnus: yup [20:05] magnus: adding $command_line =~ s/\r//g; solves it [20:05] gmcharlt: s/\r$//g; would be slightly more precise [20:05] pianohack: magnus: You might consider just replacing chomp entirely with s/[\r\n]*$//g [20:05] pianohack: No reason to have both, I don't think -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4973 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Magnus Enger <magnus@enger.priv.no> 2011-03-01 11:54:41 UTC --- *** This bug has been marked as a duplicate of bug 4084 *** -- 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org