Alexandru Balut : Fix character encoding for bugzilla query results
Alexander Nicolaysen Sørnes
asornes at winehq.org
Thu Jun 3 08:29:59 CDT 2010
Module: appdb
Branch: master
Commit: 7a70a03b567daf44d7b16fa953d4659f7fc57a25
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=7a70a03b567daf44d7b16fa953d4659f7fc57a25
Author: Alexandru Balut <alexandru.balut at gmail.com>
Date: Thu Jun 3 15:24:02 2010 +0200
Fix character encoding for bugzilla query results
---
include/query.php | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/include/query.php b/include/query.php
index 9527fb8..7b02e79 100644
--- a/include/query.php
+++ b/include/query.php
@@ -130,6 +130,12 @@ function query_bugzilladb($sQuery,$sComment="")
$hBugzillaLink = mysql_connect(BUGZILLA_DBHOST, BUGZILLA_DBUSER, BUGZILLA_DBPASS, true);
if(!$hBugzillaLink) return;
mysql_select_db(BUGZILLA_DB, $hBugzillaLink);
+ // Tell MySQL to return UTF8-encoded results
+ $sQueryAskingForUtf8Results = "SET SESSION CHARACTER_SET_RESULTS = 'utf8'";
+ if (!mysql_query($sQueryAskingForUtf8Results, $hBugzillaLink))
+ {
+ query_error($sQueryAskingForUtf8Results, "", $hBugzillaLink);
+ }
}
$hResult = mysql_query($sQuery, $hBugzillaLink);
More information about the wine-cvs
mailing list