GNU bug report logs - #26779
expr length

Previous Next

Package: coreutils;

Reported by: Андрей Воронов <voronov <at> factor-ts.ru>

Date: Thu, 4 May 2017 15:24:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 26779 <at> debbugs.gnu.org, Андрей Воронов <voronov <at> factor-ts.ru>
Subject: bug#26779: expr length
Date: Tue, 9 May 2017 03:04:56 -0400
[Message part 1 (text/plain, inline)]
Hello,

> On May 4, 2017, at 11:43, Pádraig Brady <P <at> draigBrady.com> wrote:
> 
> On 04/05/17 02:59, Андрей Воронов wrote:
>> I have the bug in expr utility when it perform operation of the 
>> calculating length of the string in my multi-byte encoding ru_RU.UTF-8.
> 
> expr is listed in the plan here:
> http://www.pixelbeat.org/docs/coreutils_i18n/

Attached a draft patch implementing multibyte support for 'expr'
(it doesn't need any code from my previous multibyte stuff, so I'm sending it separately).

Specifically, the length/index/substr operators are adjusted.
The regex engine for the 'match' operator already supported multibyte characters (only minor adjustment needed to return matched character count instead of matched byte count).
The string comparison already used 'strcoll' so I assumed they work with multibyte strings.

Comments welcomed,
 - assaf


[0001-expr-add-multibyte-support.patch.gz (application/x-gzip, attachment)]

This bug report was last modified 8 years and 56 days ago.

Previous Next


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