Fwd: [AppDB] patch: Request for UTF8-encoded results from MySQL when querying the bugs DB.
Alexandru Băluț
alexandru.balut at gmail.com
Sun May 16 11:26:15 CDT 2010
Hi,
Is anyone reviewing patches for AppDB?
Thanks,
Alex
---------- Forwarded message ----------
From: Alexandru Balut <alexandru.balut at gmail.com>
Date: Sat, May 1, 2010 at 17:29
Subject: [AppDB] patch: Request for UTF8-encoded results from MySQL
when querying the bugs DB.
To: wine-patches at winehq.org
Resending because I got no response and the patch has not been committed yet.
Partial fix for bug http://bugs.winehq.org/show_bug.cgi?id=16514 -
some characters from the bug summary do not appear correctly when a
linked bug is displayed in the page showing a version of an app. For
example, see http://appdb.winehq.org/objectManager.php?sClass=version&iId=17511
and look in that page for bug 21156.
Tested in Chrome, and Firefox, with the following chars in the title:
Iñtërnâtiônàlizætiøn 素晴らしい翻訳はここ笑
-------------- next part --------------
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-devel
mailing list