From 02af2b2bda87628a04a430c2105ea8b607bcac7f Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 8 Aug 2008 07:29:31 +0000 Subject: Bug 432931: [Oracle] Saved Searches that search multi-byte characters return empty results Patch By Max Kanat-Alexander r=xiaoou, a=mkanat --- buglist.cgi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index a498d09f1..d0f350e0a 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -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, -- cgit v1.2.3-24-g4f1b