From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22540 invoked by alias); 24 Sep 2010 19:42:24 -0000 Received: (qmail 19362 invoked by uid 48); 24 Sep 2010 19:41:52 -0000 Date: Fri, 24 Sep 2010 19:42:00 -0000 From: "bkorb at gnu dot org" To: glibc-bugs@sources.redhat.com Message-ID: <20100924194150.12053.bkorb@gnu.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/12053] New: _NL_PAPER_HEIGHT/WIDTH disobeys LC_PAPER X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00116.txt.bz2 You can print on letter sized paper and have scrambled directory listings, or you can have ASCII ordered listings but the last three lines of each printed page will appear after the end of the sheet of paper, but you cannot get what you want -- normal "ls" output and letter sized paper. The cause of the problem, I've been told, is glibc. If you set the environment variable LC_PAPER to "letter", you should get letter sized pages. Here is a sample program: #include #include #include #define NL_PAPER_GET(x) \ ((union { char *string; unsigned int word; })nl_langinfo(x)).word int main(int argc,char **argv) { int w, h; setlocale (LC_PAPER, ""); w = NL_PAPER_GET (_NL_PAPER_WIDTH); h = NL_PAPER_GET (_NL_PAPER_HEIGHT); printf ("height: %d\nwidth: %d\n", h, w); return 0; } printing programs depend upon nl_langinfo(_NL_PAPER_HEIGHT) to determine the length of a page. LC_PAPER is ignored and LC_ALL=C is obeyed in this computation. This is completely, totally outrageously screwed up. -- Summary: _NL_PAPER_HEIGHT/WIDTH disobeys LC_PAPER Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: drepper dot fsp at gmail dot com ReportedBy: bkorb at gnu dot org CC: glibc-bugs at sources dot redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=12053 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.