Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1050916

Summary: malformed output when coloring is on and grep -P has unicode input
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Škarvada <jskarvad>
Component: grepAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Holec <fholec>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: jgrulich, jskarvad, lkundrak, lzachar, psplicha
Target Milestone: rcKeywords: Rebase
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: 799403 Environment:
Last Closed: 2014-06-13 12:06:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 799403    
Bug Blocks:    

Description Jaroslav Škarvada 2014-01-09 10:45:58 UTC
+++ This bug was initially created as a clone of Bug #799403 +++

Description of problem:

I had to disable coloring to get readable output.

# echo €€ | grep -P '\p{L}'
����
# echo €€ | grep -P '\p{L}' --color=never
€€
# echo čř | grep -P '\p{L}' 
��
# echo čř | grep -P '\p{L}' --color=never
čř


Version-Release number of selected component (if applicable):
grep-2.10-2.fc17.x86_64


How reproducible:
always (I tried gnome-terminal, xterm)

Steps to Reproduce:
1. echo čř | grep -P '\p{L}'
2.
3.
  
Actual results:
��

Expected results:
čř

Additional info:

--- Additional comment from Jaroslav Škarvada on 2012-07-10 11:14:15 CEST ---

Upstream ticket:
https://savannah.gnu.org/bugs/index.php?36821

--- Additional comment from Fedora End Of Life on 2013-04-03 21:54:02 CEST ---

This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

--- Additional comment from Jaroslav Škarvada on 2014-01-03 14:07:19 CET ---

Moving to f20.

--- Additional comment from Fedora Update System on 2014-01-03 14:08:18 CET ---

grep-2.16-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-0042/grep-2.16-1.fc20

--- Additional comment from Jaroslav Škarvada on 2014-01-03 14:09:27 CET ---

With grep-2.16 I am unable to reproduce the problem any more.

--- Additional comment from Fedora Update System on 2014-01-04 20:55:11 CET ---

grep-2.16-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 1 Jaroslav Škarvada 2014-01-09 10:46:28 UTC
The best approach to resolve this is rebase grep to 2.16.

Comment 3 Jan Grulich 2014-02-04 11:45:14 UTC
Fixed in grep-2.16-1.el7.

Comment 6 Ludek Smid 2014-06-13 12:06:41 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.