Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 79D201337B6D for ; Wed, 3 Nov 2010 21:48:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 08030-01 for ; Thu, 4 Nov 2010 00:48:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 970101337B56 for ; Wed, 3 Nov 2010 21:48:39 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id oA40mdoZ095263 for ; Thu, 4 Nov 2010 00:48:39 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id oA40md61095262; Thu, 4 Nov 2010 00:48:39 GMT (envelope-from www) Date: Thu, 4 Nov 2010 00:48:39 GMT Message-Id: <201011040048.oA40md61095262@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5743: Regexp engine fails to case-insensitively match multi-byte codepoints From: "Vlad Romascanu" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201011/28 X-Sequence-Number: 28608 The following bug has been logged online: Bug reference: 5743 Logged by: Vlad Romascanu Email address: vromascanu@accurev.com PostgreSQL version: 8.4.3 Operating system: Windows, Linux Description: Regexp engine fails to case-insensitively match multi-byte codepoints Details: Already reported in 2006 but seems to have fallen through the cracks (I can find no followup.) Problem still exists in v8.4.3. Problem still appears to be pg_wc_tolower downcasting to char before calling tolower() (instead of calling towlower().) This one of several inconsistencies unfortunately still present in case-insensitive regexp vs. LOWER(str) [str_lower] treatment (including char to wchar conversion using MultiByteToWideChar/mbstowcs vs. char2wchar, or towlower vs. pg_wc_tolower.) Current workaround is to use LOWER(str) ~ LOWER('regexp').