Override response charset of MARC file in Voyager translator when known to be UTF-8 or Latin1
This fixes mangled extended characters from UPenn library's "Latin1 MARC" records, which are served without a charset and detected as UTF-8 by Firefox.
This commit is contained in:
parent
16f98f76e0
commit
d24a87c3a4
1 changed files with 6 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
|||
"maxVersion":"",
|
||||
"priority":100,
|
||||
"inRepository":true,
|
||||
"lastUpdated":"2008-07-16 20:10:00"
|
||||
"lastUpdated":"2008-12-02 10:10:00"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
|
@ -132,10 +132,14 @@ function doWeb(doc, url) {
|
|||
}
|
||||
}
|
||||
|
||||
var responseCharset = null;
|
||||
|
||||
if(unicode) {
|
||||
var rd = unicode;
|
||||
responseCharset = 'UTF-8';
|
||||
} else if(latin1) {
|
||||
var rd = latin1;
|
||||
responseCharset = 'ISO-8859-1';
|
||||
} else if(raw) {
|
||||
var rd = raw;
|
||||
} else {
|
||||
|
@ -168,6 +172,6 @@ function doWeb(doc, url) {
|
|||
marc.translate();
|
||||
|
||||
Zotero.done();
|
||||
})
|
||||
}, null, responseCharset);
|
||||
Zotero.wait();
|
||||
}
|
Loading…
Add table
Reference in a new issue