Bugs: Browse | Submit New | Admin

[#9022] The ISBN is cutted, for instance 84-7914-765-2 is returned as 84-7914-76

Date:
2007-03-04 10:54
Priority:
3
Submitted By:
Marco Costantini (laurusnobilis)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
The ISBN is cutted, for instance 84-7914-765-2 is returned as 84-7914-76

Detailed description
Suppuse that the Z39.50 ruturns the ISBN with the dashes, for instance: 84-7914-765-2 . In this case, Ruby/ZOOM cuts
the last digits of the ISBN, and returns 84-7914-76 .

The bug is in the file ruby-zoom-0.2.2/src/lib/marc.rb , in the function isbn:

        def isbn
            if value = @values[20]
                value = value.first if value.kind_of?(Array)
                if isbn = value['a']
                    isbn[0..9] # <-- bug here
                end
            end
        end

It is implicitly and wrongly assumed that the ISBN is 10 chars long, however, the ISBN may contain the dashes, and could
be the ISBN-13 (with or without dashes).

The case above, of ISBN with dashes, happens with the following example:

http://www.usc.urbe.it/bib/PUSC_Z39-50.html
hostname 193.43.132.2 port 2632 user SEARCH password SEARCHING2 database USC
pqf is @attr 1=4 "MARIA", syntax USMARC

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item