[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk] printf does not recognize .PREC if locale is en_US.UTF-8
From: |
tczy |
Subject: |
[gawk] printf does not recognize .PREC if locale is en_US.UTF-8 |
Date: |
Thu, 31 Dec 2009 13:32:39 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
*** ISSUE AND HOW TO REPRODUCE (IT): ***
echo nothing | awk '{printf "%.3s", "foobar"}'
produces 'foobar' if LC_ALL is en_US.UTF-8. Other variations of the same
program (with awk 'BEGIN{printf ...', etc.) produce the same. If LC_ALL
is set to C, everything is fine.
awk '{a=sprintf("%.3s", "foobar"); print a}'
also has this issue.
IRC reports 3.1.5 working well with UTF locale.
*** SYSTEM INFO ***
% gawk --version
GNU Awk 3.1.7
% uname -a
Linux sidep.ath.cx 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:01:40 CET 2009
x86_64 Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz GenuineIntel GNU/Linux
Also GLibC 2.11.1.
--
PGP/GnuPG keyID: D7AE1B98
Key signature: 9D08 F20B C9CA 4174 5968 C0DE 9751 20F1 D7AE 1B98
pgp2bry5GRYDq.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk] printf does not recognize .PREC if locale is en_US.UTF-8,
tczy <=