]> 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:30:45 +0000 (07:30 +0000)
committermkanat%bugzilla.org <>
Fri, 8 Aug 2008 07:30:45 +0000 (07:30 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=xiaoou, a=mkanat

buglist.cgi

index 1ae9f84a78f41f9ca5212018a03bea22fb6fb627..9356d236705ac1bac28d8588a0111bda9c4b60ab 100755 (executable)
@@ -250,6 +250,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,