Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 606796 Details for
Bug 683753
grep does not correctly handle unicode symbol property
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed fIx
0001-Request-UTF-8-mode-for-PCRE-in-UTF-8-locale.patch (text/plain), 1.24 KB, created by
Petr Pisar
on 2012-08-24 08:41:05 UTC
(
hide
)
Description:
Proposed fIx
Filename:
MIME Type:
Creator:
Petr Pisar
Created:
2012-08-24 08:41:05 UTC
Size:
1.24 KB
patch
obsolete
>From 4ebc39d97b2b0c998e80debec92c6ec27862f0ae Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> >Date: Fri, 24 Aug 2012 10:24:18 +0200 >Subject: [PATCH] Request UTF-8 mode for PCRE in UTF-8 locale >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This allows to match Unicode properties correctly, e.g. > $ echo 'â¬' | LC_ALL=cs_CZ.UTF-8 grep -P '\P{S}' >should not match. >--- > src/pcresearch.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/src/pcresearch.c b/src/pcresearch.c >index 2994e65..021b8dc 100644 >--- a/src/pcresearch.c >+++ b/src/pcresearch.c >@@ -25,6 +25,9 @@ > #elif HAVE_PCRE_PCRE_H > # include <pcre/pcre.h> > #endif >+#if HAVE_LIBPCRE && HAVE_LANGINFO_CODESET >+# include <langinfo.h> >+#endif > > #if HAVE_LIBPCRE > /* Compiled internal form of a Perl regular expression. */ >@@ -51,6 +54,11 @@ Pcompile (char const *pattern, size_t size) > char const *p; > char const *pnul; > >+#if defined HAVE_LANGINFO_CODESET >+ if (!strcmp(nl_langinfo(CODESET), "UTF-8")) >+ flags |= PCRE_UTF8; >+#endif >+ > /* FIXME: Remove these restrictions. */ > if (memchr(pattern, '\n', size)) > error (EXIT_TROUBLE, 0, _("the -P option only supports a single pattern")); >-- >1.7.11.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 683753
: 606796