public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12053] New: _NL_PAPER_HEIGHT/WIDTH disobeys LC_PAPER
@ 2010-09-24 19:42 bkorb at gnu dot org
2010-09-24 20:41 ` [Bug libc/12053] " drepper dot fsp at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: bkorb at gnu dot org @ 2010-09-24 19:42 UTC (permalink / raw)
To: glibc-bugs
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 <stdio.h>
#include <locale.h>
#include <langinfo.h>
#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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libc/12053] _NL_PAPER_HEIGHT/WIDTH disobeys LC_PAPER
2010-09-24 19:42 [Bug libc/12053] New: " bkorb at gnu dot org
@ 2010-09-24 20:41 ` drepper dot fsp at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: drepper dot fsp at gmail dot com @ 2010-09-24 20:41 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper dot fsp at gmail dot com 2010-09-24 20:40 -------
> If you set the environment
> variable LC_PAPER to "letter", you should get letter sized pages.
Whoever told you that made something up. This never worked nor will it ever do.
The paper information is part of the normal locales and only such names work.
If you don't like your locale's setting find a real, other locale and use that
name. Making up something like 'letter' doesn't work.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-30 7:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-12053-131@http.sourceware.org/bugzilla/>
2014-06-30 7:59 ` [Bug libc/12053] _NL_PAPER_HEIGHT/WIDTH disobeys LC_PAPER fweimer at redhat dot com
2010-09-24 19:42 [Bug libc/12053] New: " bkorb at gnu dot org
2010-09-24 20:41 ` [Bug libc/12053] " drepper dot fsp at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).