Bugzilla – Attachment 15296 Details for
Bug 9498
Update encoding for Norwegian sample Z39.50 servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9498 - Update encoding for Norwegian sample Z39.50 servers
Bug-9498---Update-encoding-for-Norwegian-sample-Z3.patch (text/plain), 4.03 KB, created by
Magnus Enger
on 2013-02-13 12:45:53 UTC
(
hide
)
Description:
Bug 9498 - Update encoding for Norwegian sample Z39.50 servers
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2013-02-13 12:45:53 UTC
Size:
4.03 KB
patch
obsolete
>From c1e741244e1bf7efe45b78b8f806966f7537f56c Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@enger.priv.no> >Date: Wed, 13 Feb 2013 13:43:22 +0100 >Subject: [PATCH] Bug 9498 - Update encoding for Norwegian sample Z39.50 > servers >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The encoding for sample Z39.50 servers loaded when doing a nb-NO >install has been wrong all along, resulting in "norwegian vowels" >(æøå) being displayed as weird chars when records are fetched via >Z39.50. > >This patch >- Updates the sample servers installed by the web installer >- Does a database upgrade that changes the encoding for the servers > in question > >To test: >- Do a Norwegian installation and make sure to choose the optional > sample Z39.50 targets >- Check that encodings for the Norwegian targets (BIBSYS, SAMBOK, > NORBOK and DEICHMAN) are all set to ISO_6937 (which is the wrong > encoding) >- Apply this patch and make sure updatadatabase.pl is run >- Check that the encoding for the four targets mentioned above are > now ISO_8859-1 >- Do one search against each target and check that there are no > "strange" chars in the result list. Searching each of the targets > for "hessen" should give results that include "norwegian vowels" >- Log on to the MySQL of the test installation and empty the table > of Z39.50 targets: > mysql> delete from z3950servers; >- Load this file into MySQL from the command line: > installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql > and check that it loads without errors and that the four > Norwegian targets are still set to have encoding = ISO_8859-1 >--- > .../data/mysql/nb-NO/2-Valgfritt/z3950servers.sql | 8 ++++---- > installer/data/mysql/updatedatabase.pl | 10 ++++++++++ > 2 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql b/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql >index 7bba81b..b1af0f3 100644 >--- a/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql >+++ b/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql >@@ -1,6 +1,6 @@ > INSERT INTO z3950servers (host, port, db, userid, password, name, id, checked, rank, syntax, timeout, icon, position, type, encoding, description) VALUES > ('lx2.loc.gov',210,'LCDB','','','LIBRARY OF CONGRESS',1,0,0,'USMARC',0,NULL,'primary','zed','utf8',''), >-('z3950.bibsys.no',2100,'BIBSYS','','','BIBSYS',12,1,1,'NORMARC',0,NULL,'primary','zed','ISO_6937',''), >-('z3950.nb.no',2100,'Norbok','','','NORBOK',13,0,0,'NORMARC',0,NULL,'primary','zed','ISO_6937',''), >-('z3950.nb.no',2100,'Sambok','','','SAMBOK',14,0,0,'NORMARC',0,NULL,'primary','zed','ISO_6937',''), >-('z3950.deich.folkebibl.no',210,'data','','','DEICHMAN',15,0,0,'NORMARC',0,NULL,'primary','zed','ISO_6937',''); >+('z3950.bibsys.no',2100,'BIBSYS','','','BIBSYS',12,1,1,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''), >+('z3950.nb.no',2100,'Norbok','','','NORBOK',13,0,0,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''), >+('z3950.nb.no',2100,'Sambok','','','SAMBOK',14,0,0,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''), >+('z3950.deich.folkebibl.no',210,'data','','','DEICHMAN',15,0,0,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index ed922b8..285e8c6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6399,6 +6399,16 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.11.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'BIBSYS'"); >+ $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'NORBOK'"); >+ $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'SAMBOK'"); >+ $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'DEICHMAN'"); >+ print "Upgrade to $DBversion done (Bug 9498 - Update encoding for Norwegian sample Z39.50 servers)\n"; >+ SetVersion($DBversion); >+} >+ > > =head1 FUNCTIONS > >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9498
:
15296
|
15423
|
16904
|
16927
|
16928
|
16937
|
16939
|
16940
|
16941