GNU bug report logs - #14456
multibyte: stat's %[X] counts bytes instead of characters

Previous Next

Package: coreutils;

Reported by: "camion_spam-debrpbg <at> yahoo.fr" <camion_spam-debrpbg <at> yahoo.fr>

Date: Thu, 23 May 2013 20:43:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 14456 AT debbugs.gnu.org.

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#14456; Package coreutils. (Thu, 23 May 2013 20:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "camion_spam-debrpbg <at> yahoo.fr" <camion_spam-debrpbg <at> yahoo.fr>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 23 May 2013 20:43:02 GMT) Full text and rfc822 format available.

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

From: "camion_spam-debrpbg <at> yahoo.fr" <camion_spam-debrpbg <at> yahoo.fr>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: Stat I18N problem with the format string.
Date: Thu, 23 May 2013 21:39:29 +0100 (BST)
[Message part 1 (text/plain, inline)]
stat (GNU coreutils) 8.5

the format string length is counted in bytes and not in characters so that the presence of variable length characters causes misalignment

In the following example the character 'é' is 2 bytes long : 
$ find . | while read P; do LANG=C stat --printf '%16F 0x%f\n' "$P"; done
       directory 0x41ed
   symbolic link 0xa1ff

    regular file 0x81f6
$ find . | while read P; do LANG=fr_BE.UTF-8 stat --printf '%16F 0x%f\n' "$P"; done
     répertoire 0x41ed
 lien symbolique 0xa1ff
         fichier 0x81f6
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#14456; Package coreutils. (Fri, 19 Oct 2018 00:37:02 GMT) Full text and rfc822 format available.

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

From: Assaf Gordon <assafgordon <at> gmail.com>
To: "camion_spam-debrpbg <at> yahoo.fr" <camion_spam-debrpbg <at> yahoo.fr>,
 14456 <at> debbugs.gnu.org
Subject: Re: bug#14456: Stat I18N problem with the format string.
Date: Thu, 18 Oct 2018 18:36:06 -0600
close 14456
stop

(triaging old bugs)

Hello,

On 23/05/13 02:39 PM, camion_spam-debrpbg <at> yahoo.fr wrote:
> stat (GNU coreutils) 8.5
> 
> the format string length is counted in bytes and not in characters so that the presence of variable length characters causes misalignment
> 
> In the following example the character 'é' is 2 bytes long :
> $ find . | while read P; do LANG=C stat --printf '%16F 0x%f\n' "$P"; done
>         directory 0x41ed
>     symbolic link 0xa1ff
> 
>      regular file 0x81f6
> $ find . | while read P; do LANG=fr_BE.UTF-8 stat --printf '%16F 0x%f\n' "$P"; done
>       répertoire 0x41ed
>   lien symbolique 0xa1ff
>           fichier 0x81f6
> 

It seems your email "fell between the cracks" and not replied to in many 
years. Sorry about that.

If this is still an issue, please visit the following page to
find the contact person about French translations:

    http://translationproject.org/domain/coreutils.html

As the coreutils' team can't fix translations, I'm closing this item.

regards,
  - assaf




bug closed, send any further explanations to 14456 <at> debbugs.gnu.org and "camion_spam-debrpbg <at> yahoo.fr" <camion_spam-debrpbg <at> yahoo.fr> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Oct 2018 00:37:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#14456; Package coreutils. (Sat, 20 Oct 2018 19:31:02 GMT) Full text and rfc822 format available.

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

From: Errembault Philippe <philippe_errembault <at> yahoo.fr>
To: "14456 <at> debbugs.gnu.org" <14456 <at> debbugs.gnu.org>
Subject: This bug is still present and has nothing to do with a translation
 problem. It's an I18N bultibytes characters problem.
Date: Sat, 20 Oct 2018 18:45:07 +0000 (UTC)
[Message part 1 (text/plain, inline)]
I had forgotten about this problem, but it is still present in the version 8.25 present on the linux mint 18.3 distribution I'm using right now.This has absolutely nothing to do with a translation problem. It is related with the I18N multibytes string processing.
As you can see, the line with the word «répertoire» is one character shorter because the «é» occupies 2 bytes in UTF-8.
[Message part 2 (text/html, inline)]

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Oct 2018 23:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#14456; Package coreutils. (Sat, 20 Oct 2018 23:50:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Errembault Philippe <philippe_errembault <at> yahoo.fr>,
 "14456 <at> debbugs.gnu.org" <14456 <at> debbugs.gnu.org>
Subject: Re: bug#14456: This bug is still present and has nothing to do with a
 translation problem. It's an I18N bultibytes characters problem.
Date: Sat, 20 Oct 2018 16:49:14 -0700
I reopened the bug report.




Information forwarded to bug-coreutils <at> gnu.org:
bug#14456; Package coreutils. (Sun, 21 Oct 2018 20:47:02 GMT) Full text and rfc822 format available.

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

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Errembault Philippe <camion_spam-debrpbg <at> yahoo.fr>, 14456 <at> debbugs.gnu.org
Subject: Re: bug#14456: Stat I18N problem with the format string.
Date: Sun, 21 Oct 2018 14:46:40 -0600
severity 14456 wishlist
retitle 14456 multibyte: stat's %[X] counts bytes instead of characters
stop

Hello,

On 20/10/18 12:40 PM, Errembault Philippe wrote:
> This has absolutely nothing to do with a translation problem. It is 
> related with the I18N string processing.
> As you can see, the line with the word «répertoire» is one character 
> shorter because the «é» occupies 2 bytes in UTF-8.

Thanks for persisting - it is indeed a bug
and not a translation issue.
(also similar to https://bugs.gnu.org/17196).

-assaf





Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Oct 2018 20:47:02 GMT) Full text and rfc822 format available.

Changed bug title to 'multibyte: stat's %[X] counts bytes instead of characters' from 'Stat I18N problem with the format string.' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Oct 2018 20:47:02 GMT) Full text and rfc822 format available.

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

Previous Next


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