]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 432931: [Oracle] Saved Searches that search multi-byte characters return empty...
authormkanat%bugzilla.org <>
Fri, 8 Aug 2008 07:29:31 +0000 (07:29 +0000)
committermkanat%bugzilla.org <>
Fri, 8 Aug 2008 07:29:31 +0000 (07:29 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=xiaoou, a=mkanat

buglist.cgi

index a498d09f1a4b02766deccf0b688bcf10b9937202..d0f350e0a6ef3b05f788c859689c23ddc4b09b2b 100755 (executable)
@@ -253,6 +253,12 @@ sub LookupNamedQuery {
                                                 WHERE userid = ? AND name = ?
                                                       $extra",
                                                undef, @args);
+
+    # Some DBs (read: Oracle) incorrectly mark this string as UTF-8
+    # even though it has no UTF-8 characters in it, which prevents
+    # Bugzilla::CGI from later reading it correctly.
+    utf8::downgrade($result) if utf8::is_utf8($result);
+
     if (!defined($result)) {
         return 0 unless $throw_error;
         ThrowUserError("missing_query", {'queryname' => $name,