From: mkanat%bugzilla.org <> Date: Fri, 8 Aug 2008 07:30:45 +0000 (+0000) Subject: Bug 432931: [Oracle] Saved Searches that search multi-byte characters return empty... X-Git-Tag: bugzilla-3.2rc1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5865446927f979ba67b5dab72490cea3f874d9f7;p=thirdparty%2Fbugzilla.git Bug 432931: [Oracle] Saved Searches that search multi-byte characters return empty results Patch By Max Kanat-Alexander r=xiaoou, a=mkanat --- diff --git a/buglist.cgi b/buglist.cgi index 1ae9f84a78..9356d23670 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -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,