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

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

[Fwd: gawk-stable: truncated printf output]


From: Hermann Peifer
Subject: [Fwd: gawk-stable: truncated printf output]
Date: Wed, 17 Sep 2008 09:52:26 +0200
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

I should have sent my below mail to this list in the first place. Sorry, Hermann

-------- Original Message --------
Subject: gawk-stable: truncated printf output
Date: Tue, 16 Sep 2008 16:35:37 +0200
From: Hermann Peifer <address@hidden>
To: address@hidden

Hi Arnold,

I might be doing something terribly wrong, but it looks to me that gawk printf 
(gawk-stable from CVS) doesn't like the mikro sign in my ISO-8859-1 encoded 
text files. Printf output is silently truncated, see below.

LANG=C seems to fix the issue, but this shouldn't be necessary, should it?
Regards, Hermann


address@hidden:konti]> uname -a
Linux whitefish.eea.eu.int 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:55:12 EDT 2007 
i686 i686 i386 GNU/Linux

address@hidden:konti]> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

address@hidden:konti]> file DEMSLT07.PMT
DEMSLT07.PMT: ISO-8859 text, with CRLF line terminators

address@hidden:konti]> gawk-versions/gawk-stable/gawk 'FNR==1{print $0}' 
DEMSLT07.PMT
COMPONENT suspended particulates <10 µm (air), day

address@hidden:konti]> gawk-versions/gawk-stable/gawk 'FNR==1{printf "%s\n", 
$0}' DEMSLT07.PMT
COMPONENT suspended particulates <10

address@hidden:konti]> LANG=C gawk-versions/gawk-stable/gawk 'FNR==1{printf 
"%s\n", $0}' DEMSLT07.PMT
COMPONENT suspended particulates <10 µm (air), day

address@hidden:konti]> gawk-versions/gawk-3.1.6/gawk 'FNR==1{printf "%s\n", 
$0}' DEMSLT07.PMT
COMPONENT suspended particulates <10 µm (air), day

address@hidden:konti]> gawk-versions/gawk-3.1.5/gawk 'FNR==1{printf "%s\n", 
$0}' DEMSLT07.PMT
COMPONENT suspended particulates <10 µm (air), day





reply via email to

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