[Koha-cvs] koha C4/Biblio.pm C4/Context.pm koha-tmpl/intra...

paul poulain paul at koha-fr.org
Wed Jan 4 16:54:55 CET 2006


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch: 	
Changes by:	paul poulain <tipaul at savannah.gnu.org>	06/01/04 15:54:55

Modified files:
	C4             : Biblio.pm Context.pm 
	koha-tmpl/intranet-tmpl/default/en/includes: about-top.inc 
	                                             acquisitions-top.inc 
	                                             auth-search-top.inc 
	                                             auth-top.inc 
	                                             bull-top.inc 
	                                             cat-top.inc 
	                                             circulation-top.inc 
	                                             error-top.inc 
	                                             help-top.inc 
	                                             marc-top.inc 
	                                             members-top.inc 
	                                             neutral-top.inc 
	                                             opac-top.inc 
	                                             parameters-top.inc 
	                                             popup-top.inc 
	                                             quicksearch-top.inc 
	                                             reports-top.inc 
	                                             reportswcal-top.inc 
	updater        : updatedatabase 

Log message:
	utf8 is a : go for beta test in HEAD.
	some explanations :
	- updater/updatedatabase => will transform all tables in innoDB (not related to utf8, just to warn you) AND collate them in utf8 / utf8_general_ci. The SQL command is : ALTER TABLE tablename DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci.
	- *-top.inc will show the pages in utf8
	- THE HARD THING : for me, mysql-client and mysql-server were set up to communicate in iso8859-1, whatever the mysql collation ! Thus, pages were improperly shown, as datas were transmitted in iso8859-1 format ! After a full day of investigation, someone on usenet pointed "set NAMES 'utf8'" to explain that I wanted utf8. I could put this in my.cnf, but if I do that, ALL databases will "speak" in utf8, that's not what we want. Thus, I added a line in Context.pm : everytime a DB handle is opened, the communication is set to utf8.
	- using marcxml field and no more the iso2709 raw marc biblioitems.marc field.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?tr1=1.133&tr2=1.134&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Context.pm.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/about-top.inc.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-top.inc.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-search-top.inc.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-top.inc.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/bull-top.inc.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/cat-top.inc.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/circulation-top.inc.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/error-top.inc.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-top.inc.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/members-top.inc.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/neutral-top.inc.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/opac-top.inc.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/parameters-top.inc.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/quicksearch-top.inc.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/reports-top.inc.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/reportswcal-top.inc.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/updater/updatedatabase.diff?tr1=1.124&tr2=1.125&r1=text&r2=text

Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.133 koha/C4/Biblio.pm:1.134
--- koha/C4/Biblio.pm:1.133	Mon Dec 12 14:25:51 2005
+++ koha/C4/Biblio.pm	Wed Jan  4 15:54:55 2006
@@ -277,10 +277,10 @@
 
     # Returns MARC::Record of the biblio passed in parameter.
     my ( $dbh, $biblionumber ) = @_;
-	my $sth = $dbh->prepare('select marc from biblioitems where biblionumber=?');
+	my $sth = $dbh->prepare('select marcxml from biblioitems where biblionumber=?');
 	$sth->execute($biblionumber);
 	my ($marc) = $sth->fetchrow;
-	my $record = MARC::File::USMARC::decode($marc);
+	my $record = MARC::Record::new_from_xml($marc);
     return $record;
 }
 
@@ -2882,8 +2882,16 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.133 2005/12/12 14:25:51 thd Exp $
+# $Id: Biblio.pm,v 1.134 2006/01/04 15:54:55 tipaul Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.134  2006/01/04 15:54:55  tipaul
+# utf8 is a : go for beta test in HEAD.
+# some explanations :
+# - updater/updatedatabase => will transform all tables in innoDB (not related to utf8, just to warn you) AND collate them in utf8 / utf8_general_ci. The SQL command is : ALTER TABLE tablename DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci.
+# - *-top.inc will show the pages in utf8
+# - THE HARD THING : for me, mysql-client and mysql-server were set up to communicate in iso8859-1, whatever the mysql collation ! Thus, pages were improperly shown, as datas were transmitted in iso8859-1 format ! After a full day of investigation, someone on usenet pointed "set NAMES 'utf8'" to explain that I wanted utf8. I could put this in my.cnf, but if I do that, ALL databases will "speak" in utf8, that's not what we want. Thus, I added a line in Context.pm : everytime a DB handle is opened, the communication is set to utf8.
+# - using marcxml field and no more the iso2709 raw marc biblioitems.marc field.
+#
 # Revision 1.133  2005/12/12 14:25:51  thd
 #
 #
Index: koha/C4/Context.pm
diff -u koha/C4/Context.pm:1.27 koha/C4/Context.pm:1.28
--- koha/C4/Context.pm:1.27	Wed Oct 26 09:12:33 2005
+++ koha/C4/Context.pm	Wed Jan  4 15:54:55 2006
@@ -15,7 +15,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Context.pm,v 1.27 2005/10/26 09:12:33 tipaul Exp $
+# $Id: Context.pm,v 1.28 2006/01/04 15:54:55 tipaul Exp $
 # Revision History:
 # 2004-08-11 A. Tarallo: Added the function db_escheme2dbi, tested my bugfixes,
 # further  details about them in the code.
@@ -31,7 +31,7 @@
 	qw($context),
 	qw(@context_stack);
 
-$VERSION = do { my @v = '$Revision: 1.27 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.28 $' =~ /\d+/g;
 		shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -408,8 +408,12 @@
 	my $db_host   = $context->{"config"}{"hostname"};
 	my $db_user   = $context->{"config"}{"user"};
 	my $db_passwd = $context->{"config"}{"pass"};
-	return DBI->connect("DBI:$db_driver:$db_name:$db_host",
+	my $dbh= DBI->connect("DBI:$db_driver:$db_name:$db_host",
 			    $db_user, $db_passwd);
+	# Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha, whatever the mysql default config.
+	# this is better than modifying my.cnf (and forcing all communications to be in utf8)
+	$dbh->do("set NAMES 'utf8'");
+	return $dbh;
 }
 
 =item dbh
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/about-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/about-top.inc:1.21 koha/koha-tmpl/intranet-tmpl/default/en/includes/about-top.inc:1.22
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/about-top.inc:1.21	Thu Aug  4 13:55:47 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/about-top.inc	Wed Jan  4 15:54:55 2006
@@ -4,7 +4,7 @@
 <head>
 <title>KOHA: INTRANET: About</title>
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 <script language="JavaScript" type="text/javascript">
 function Help() {
 	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-top.inc:1.28 koha/koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-top.inc:1.29
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-top.inc:1.28	Thu Aug  4 13:55:47 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-top.inc	Wed Jan  4 15:54:55 2006
@@ -15,7 +15,7 @@
 </script>
 <!-- /Additions for Calendar-system -->
 
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 <script language="JavaScript" type="text/javascript">
 function Help() {
 	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-search-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-search-top.inc:1.2 koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-search-top.inc:1.3
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-search-top.inc:1.2	Mon Sep 13 15:30:18 2004
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-search-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>KOHA: INTRANET: Authorities</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <script language="JavaScript">
 <!-- Hide from old browsers
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-top.inc:1.8 koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-top.inc:1.9
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-top.inc:1.8	Thu Aug  4 13:55:47 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/auth-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>KOHA: INTRANET: Authorities</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <script language="JavaScript">
 <!-- Hide from old browsers
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/bull-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/bull-top.inc:1.6 koha/koha-tmpl/intranet-tmpl/default/en/includes/bull-top.inc:1.7
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/bull-top.inc:1.6	Thu Aug  4 13:55:47 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/bull-top.inc	Wed Jan  4 15:54:55 2006
@@ -4,7 +4,7 @@
 <head>
 <title>KOHA: INTRANET: Serials management</title>
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 <script language="JavaScript" type="text/javascript">
 function Help() {
 	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/cat-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/cat-top.inc:1.36 koha/koha-tmpl/intranet-tmpl/default/en/includes/cat-top.inc:1.37
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/cat-top.inc:1.36	Thu Aug  4 13:55:47 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/cat-top.inc	Wed Jan  4 15:54:55 2006
@@ -2,7 +2,7 @@
 <html>
 <head>
 <title>KOHA: INTRANET: Catalogue</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <script language="JavaScript" type="text/javascript">
 <!-- Hide from old browsers
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/circulation-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/circulation-top.inc:1.31 koha/koha-tmpl/intranet-tmpl/default/en/includes/circulation-top.inc:1.32
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/circulation-top.inc:1.31	Thu Aug  4 13:55:48 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/circulation-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>KOHA: INTRANET: Circulation</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <script language="JavaScript">
 <!-- Hide from old browsers
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/error-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/error-top.inc:1.3 koha/koha-tmpl/intranet-tmpl/default/en/includes/error-top.inc:1.4
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/error-top.inc:1.3	Fri Sep 17 13:19:56 2004
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/error-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>KOHA: INTRANET: Catalogue</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <script language="JavaScript">
 <!-- Hide from old browsers
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc:1.4 koha/koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc:1.5
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc:1.4	Thu Aug  5 16:36:50 2004
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>KOHA: online help</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
 <body>
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-top.inc:1.14 koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-top.inc:1.15
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-top.inc:1.14	Thu Aug  4 14:02:52 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>KOHA: INTRANET: Catalogue</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <script language="JavaScript" type="text/javascript">
 <!-- Hide from old browsers
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/members-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/members-top.inc:1.29 koha/koha-tmpl/intranet-tmpl/default/en/includes/members-top.inc:1.30
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/members-top.inc:1.29	Wed Oct 26 09:17:07 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/members-top.inc	Wed Jan  4 15:54:55 2006
@@ -4,7 +4,7 @@
 <head>
 <title>KOHA: INTRANET: Members</title>
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 <script language="JavaScript" type="text/javascript">
 function Help() {
 	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/neutral-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/neutral-top.inc:1.1 koha/koha-tmpl/intranet-tmpl/default/en/includes/neutral-top.inc:1.2
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/neutral-top.inc:1.1	Fri Jul 30 14:19:19 2004
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/neutral-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>KOHA: INTRANET: Catalogue</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <script language="JavaScript">
 <!-- Hide from old browsers
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/opac-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/opac-top.inc:1.10 koha/koha-tmpl/intranet-tmpl/default/en/includes/opac-top.inc:1.11
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/opac-top.inc:1.10	Fri Jul 30 14:19:19 2004
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/opac-top.inc	Wed Jan  4 15:54:55 2006
@@ -4,7 +4,7 @@
 <html>
 <head>
 <title>KOHA: OPAC Catalogue Search</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 </head>
 <body text="black" bgcolor="white" link="#0000ff" vlink="#3366cc" Alink="#cc3300"
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/parameters-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/parameters-top.inc:1.33 koha/koha-tmpl/intranet-tmpl/default/en/includes/parameters-top.inc:1.34
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/parameters-top.inc:1.33	Wed Oct 26 09:17:07 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/parameters-top.inc	Wed Jan  4 15:54:55 2006
@@ -7,7 +7,7 @@
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
 <!-- End of additions -->
 
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 <!-- Additions to enable Calendar system -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc:1.3 koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc:1.4
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc:1.3	Thu Aug  5 16:36:50 2004
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>popup</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
 
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/quicksearch-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/quicksearch-top.inc:1.1 koha/koha-tmpl/intranet-tmpl/default/en/includes/quicksearch-top.inc:1.2
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/quicksearch-top.inc:1.1	Thu Jan 13 22:39:31 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/quicksearch-top.inc	Wed Jan  4 15:54:55 2006
@@ -3,7 +3,7 @@
 <html>
 <head>
 <title>popup</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
 <script language="javascript" type="text/javascript">
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/reports-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/reports-top.inc:1.26 koha/koha-tmpl/intranet-tmpl/default/en/includes/reports-top.inc:1.27
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/reports-top.inc:1.26	Thu Aug  4 14:05:18 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/reports-top.inc	Wed Jan  4 15:54:55 2006
@@ -4,7 +4,7 @@
 <head>
 <title>KOHA: INTRANET: Reports</title>
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 <script language="JavaScript" type="text/javascript">
 function Help() {
 	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
Index: koha/koha-tmpl/intranet-tmpl/default/en/includes/reportswcal-top.inc
diff -u koha/koha-tmpl/intranet-tmpl/default/en/includes/reportswcal-top.inc:1.2 koha/koha-tmpl/intranet-tmpl/default/en/includes/reportswcal-top.inc:1.3
--- koha/koha-tmpl/intranet-tmpl/default/en/includes/reportswcal-top.inc:1.2	Wed Oct 26 09:17:07 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/includes/reportswcal-top.inc	Wed Jan  4 15:54:55 2006
@@ -8,7 +8,7 @@
 <!-- End of additions -->
 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
 
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
 <!-- Additions to enable Calendar system -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
Index: koha/updater/updatedatabase
diff -u koha/updater/updatedatabase:1.124 koha/updater/updatedatabase:1.125
--- koha/updater/updatedatabase:1.124	Thu Oct 27 12:09:05 2005
+++ koha/updater/updatedatabase	Wed Jan  4 15:54:55 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.124 2005/10/27 12:09:05 tipaul Exp $
+# $Id: updatedatabase,v 1.125 2006/01/04 15:54:55 tipaul Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -545,6 +545,22 @@
 	print "\rdone\n";
 }
 
+# MOVE all tables TO UTF-8 and innoDB
+$sth = $dbh->prepare("show table status");
+$sth->execute;
+while ( my $table = $sth->fetchrow_hashref ) {
+	if ($table->{Engine} ne 'InnoDB') {
+		$dbh->do("ALTER TABLE $table->{Name} TYPE = innodb");
+		print "moving $table->{Name} to InnoDB\n";
+	}
+	unless ($table->{Collation} =~ /^utf8/) {
+		$dbh->do("ALTER TABLE $table->{Name} DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
+		# FIXME : maybe a ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf8 would be better, def char set seems to work fine. If any problem encountered, let's try with convert !
+		print "moving $table->{Name} to utf8\n";
+	} else {
+	}
+}
+
 # at last, remove useless fields
 foreach $table ( keys %uselessfields ) {
 	my @fields = split /,/,$uselessfields{$table};
@@ -737,6 +753,14 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.125  2006/01/04 15:54:55  tipaul
+# utf8 is a : go for beta test in HEAD.
+# some explanations :
+# - updater/updatedatabase => will transform all tables in innoDB (not related to utf8, just to warn you) AND collate them in utf8 / utf8_general_ci. The SQL command is : ALTER TABLE tablename DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci.
+# - *-top.inc will show the pages in utf8
+# - THE HARD THING : for me, mysql-client and mysql-server were set up to communicate in iso8859-1, whatever the mysql collation ! Thus, pages were improperly shown, as datas were transmitted in iso8859-1 format ! After a full day of investigation, someone on usenet pointed "set NAMES 'utf8'" to explain that I wanted utf8. I could put this in my.cnf, but if I do that, ALL databases will "speak" in utf8, that's not what we want. Thus, I added a line in Context.pm : everytime a DB handle is opened, the communication is set to utf8.
+# - using marcxml field and no more the iso2709 raw marc biblioitems.marc field.
+#
 # Revision 1.124  2005/10/27 12:09:05  tipaul
 # new features for serial module :
 # - the last 5 issues are now shown, and their status can be changed (but not reverted to "waited", as there can be only one "waited")





More information about the Koha-cvs mailing list