[Koha-bugs] [Bug 12174] Zotero connection with Koha: problem with UTF-8

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 2 12:11:00 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12174

--- Comment #1 from Zeno Tajoli <z.tajoli at cineca.it> ---
I find the problem.
It is a mix of apache / new Zotero working.
1)The bug is not present in installation that use Ngix instead of apache.
2)Zotero doesn't use only COinS from Koha but if use also the record export
(../cgi-bin/koha/opac-export.pl)

3)The cgi opac-export.pl it is ok to write a file on this but not if you try to
use it like a stream in Zotero.
Try:
curl -i
'http://pust.urbe.it/cgi-bin/koha/opac-export.pl?format=utf8&op=export&bib=71000&save=Go'
The result:

HTTP/1.1 200 OK
Date: Fri, 02 May 2014 09:41:22 GMT
Server: Apache/2.2.22 (Debian)
Content-Disposition: attachment; filename="bib-71000.utf8"
Transfer-Encoding: chunked
Content-Type: application/octet-stream; charset=ISO-8859-1

01403nam a2200265 i 4500001000600000003000900006005001700015 [the iso2709
output]

4)The header "charset=ISO-8859-1" is the default on Apache (Ngix doesn't inser
anything instead).

5)Zotero read the header and it thinks that the stream in iso2709 format is
written with ISO-8859-1 charset.


So the fix is to be esplict on charset when we print the result.

From
94:     print $query->header(
95:      -type => 'application/octet-stream',
96:      -attachment=>"bib-$biblionumber.$format");
To
94:     print $query->header(
95:      -type => 'application/octet-stream',
96:      -charset=>'utf-8',
97:      -attachment=>"bib-$biblionumber.$format");

I will write and send the patch soon

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list