GNU bug report logs - #22064
expr: expr string : '.*' returns the number of matched bytes not characters

Previous Next

Package: coreutils;

Reported by: Stephane Chazelas <stephane.chazelas <at> gmail.com>

Date: Mon, 30 Nov 2015 21:11:01 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22064 in the body.
You can then email your comments to 22064 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#22064; Package coreutils. (Mon, 30 Nov 2015 21:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephane Chazelas <stephane.chazelas <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 30 Nov 2015 21:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephane Chazelas <stephane.chazelas <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: expr: expr string : '.*' returns the number of matched bytes not
 characters
Date: Mon, 30 Nov 2015 21:09:45 +0000
Hello,

that's another multibyte issue, it may be known already but I
can't see it being referenced on debbugs.gnu.org.

$ locale charmap
UTF-8
$ expr é : .
2
$ expr é 

That is, characters are correctly matched, but a number of bytes
instead of characters is returned.

Same problem with

$ expr length é
2
$ expr index éx x
3


(with both 8.23 and git head on Debian testing).

-- 
Stephane






Information forwarded to bug-coreutils <at> gnu.org:
bug#22064; Package coreutils. (Wed, 24 Oct 2018 21:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 22064 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 22064 <at> debbugs.gnu.org
Subject: Re: bug#22064: expr: expr string : '.*' returns the number of matched
 bytes not characters
Date: Wed, 24 Oct 2018 15:32:59 -0600
tags 22064 fixed
close 22064
stop


(triaging old bugs)

On 30/11/15 02:09 PM, Stephane Chazelas wrote:
> 
> that's another multibyte issue, it may be known already but I
> can't see it being referenced on debbugs.gnu.org.
> 

This commit added multibyte support to expr(1):
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=a9f2be5bfec2bfe86c0851787312996467a653ee

Available since coreutils 8.28 (released Sep 2017).

Closing as "fixed".

-assaf







Added tag(s) fixed. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Oct 2018 21:34:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 22064 <at> debbugs.gnu.org and Stephane Chazelas <stephane.chazelas <at> gmail.com> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Oct 2018 21:34:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Nov 2018 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.