From 499484a768abf48814438e527a764944d54d82d0 Mon Sep 17 00:00:00 2001 From: plg Date: Wed, 15 Mar 2006 11:21:56 +0000 Subject: [PATCH] bug fixed: utf-8 data where not displayed correctly in screens. Supposing your data are truely utf-8 encoded in your database, they should be correctly displayed. "set names 'UTF8'" on mysql connection (C4/Context.pm) is mandatory and "binmode" to utf8 (C4/Interface/CGI/Output.pm) seemed to converted data twice, so it was removed. --- C4/Context.pm | 9 ++++++++- C4/Interface/CGI/Output.pm | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 6eb7e07298..348eae8157 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -466,7 +466,7 @@ sub _new_dbh $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'"); + $dbh->do("set NAMES 'utf8'"); return $dbh; } @@ -780,6 +780,13 @@ Andrew Arensburger =cut # $Log$ +# Revision 1.33 2006/03/15 11:21:56 plg +# bug fixed: utf-8 data where not displayed correctly in screens. Supposing +# your data are truely utf-8 encoded in your database, they should be +# correctly displayed. "set names 'UTF8'" on mysql connection (C4/Context.pm) +# is mandatory and "binmode" to utf8 (C4/Interface/CGI/Output.pm) seemed to +# converted data twice, so it was removed. +# # Revision 1.32 2006/03/03 17:25:01 hdl # Bug fixing : a line missed a comment sign. # diff --git a/C4/Interface/CGI/Output.pm b/C4/Interface/CGI/Output.pm index 8f8f3c6aef..fad75ce48b 100644 --- a/C4/Interface/CGI/Output.pm +++ b/C4/Interface/CGI/Output.pm @@ -106,7 +106,6 @@ corresponds to the HTML page $html. sub output_html_with_http_headers ($$$) { my($query, $cookie, $html) = @_; - binmode(STDOUT, ":utf8"); print $query->header( -type => guesstype($html), -cookie => $cookie, -- 2.20.1