bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gawk] printf does not recognize .PREC if locale is en_US.UTF-8


From: Aharon Robbins
Subject: Re: [gawk] printf does not recognize .PREC if locale is en_US.UTF-8
Date: Mon, 01 Feb 2010 21:56:27 +0200

Greetings: I may have answered this already...

> Date: Thu, 31 Dec 2009 13:32:39 +0200
> From: tczy <address@hidden>
> To: address@hidden
> Subject: [gawk] printf does not recognize .PREC if locale is en_US.UTF-8
>
> *** 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.

This is a bug; it's been fixed for a while in the current gawk CVS.  Let me
know if you need a patch specifically for this.

Thanks,

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]