|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
[Fwd: gawk-stable: truncated printf output]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 <peifer@...> To: arnold@... 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 [peifer@whitefish: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 [peifer@whitefish: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= [peifer@whitefish:konti]> file DEMSLT07.PMT DEMSLT07.PMT: ISO-8859 text, with CRLF line terminators [peifer@whitefish:konti]> gawk-versions/gawk-stable/gawk 'FNR==1{print $0}' DEMSLT07.PMT COMPONENT suspended particulates <10 µm (air), day [peifer@whitefish:konti]> gawk-versions/gawk-stable/gawk 'FNR==1{printf "%s\n", $0}' DEMSLT07.PMT COMPONENT suspended particulates <10 [peifer@whitefish:konti]> LANG=C gawk-versions/gawk-stable/gawk 'FNR==1{printf "%s\n", $0}' DEMSLT07.PMT COMPONENT suspended particulates <10 µm (air), day [peifer@whitefish:konti]> gawk-versions/gawk-3.1.6/gawk 'FNR==1{printf "%s\n", $0}' DEMSLT07.PMT COMPONENT suspended particulates <10 µm (air), day [peifer@whitefish:konti]> gawk-versions/gawk-3.1.5/gawk 'FNR==1{printf "%s\n", $0}' DEMSLT07.PMT COMPONENT suspended particulates <10 µm (air), day |
|
|
Re: [Fwd: gawk-stable: truncated printf output]-------- Original Message --------
Subject: [Fwd: gawk-stable: truncated printf output] From: Hermann Peifer <peifer@...> To: Date: 17/09/2008 09:52 > 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 <peifer@...> > To: arnold@... > > 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 > > > [peifer@whitefish: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 > > [peifer@whitefish: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= > > [peifer@whitefish:konti]> file DEMSLT07.PMT > DEMSLT07.PMT: ISO-8859 text, with CRLF line terminators > > [peifer@whitefish:konti]> gawk-versions/gawk-stable/gawk 'FNR==1{print > $0}' DEMSLT07.PMT > COMPONENT suspended particulates <10 µm (air), day > > [peifer@whitefish:konti]> gawk-versions/gawk-stable/gawk 'FNR==1{printf > "%s\n", $0}' DEMSLT07.PMT > COMPONENT suspended particulates <10 > > [peifer@whitefish:konti]> LANG=C gawk-versions/gawk-stable/gawk > 'FNR==1{printf "%s\n", $0}' DEMSLT07.PMT > COMPONENT suspended particulates <10 µm (air), day > > [peifer@whitefish:konti]> gawk-versions/gawk-3.1.6/gawk 'FNR==1{printf > "%s\n", $0}' DEMSLT07.PMT > COMPONENT suspended particulates <10 µm (air), day > > [peifer@whitefish:konti]> gawk-versions/gawk-3.1.5/gawk 'FNR==1{printf > "%s\n", $0}' DEMSLT07.PMT > COMPONENT suspended particulates <10 µm (air), day > > > > Any news on this case? Hermann |
| Free Forum Powered by Nabble | Forum Help |