Comment 0 for bug 10910

Revision history for this message
In , Markus Kuhn (markus-kuhn) wrote :

The default download binary of Mozilla 1.0rc2 for Linux comes with language
setting en-US only and sets the printing page size at each invocation back to
"US Letter". This is extremely disruptive for most users. The vast majority of
printers (namely practically *every* printer outside the USA and Canada) is fed
with international standard A4 paper.

Similarly, the vast majority of users worldwide are used to think in
millimeters, not inches, but the default margin settings in the print menu use
inches. It is currently not at all obvious for a highly computer literate user
how to change these settings.

A non-North American user should never ever have to worry about the paper size.
No changing to A4 should be necessary ever.

Suggestion: Mozilla for Linux can trivially determine whether it was invoked in
North America by looking at the standard POSIX locale environment variables. The
default settings for printer paper and unit of measurement should be determined
under Linux as in the following example code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* LC_PAPER and LC_MEASUREMENT were introduced
   in a ISO/IEC TR 14652 draft */

int main()
{
  char *units = "mm";
  char *paper = "A4";
  char *s;

  if (((s = getenv("LC_ALL")) && *s) ||
      ((s = getenv("LC_PAPER")) && *s) ||
      ((s = getenv("LANG")) && *s))
    if (strstr(s, "_US") || strstr(s, "_CA"))
      paper = "Letter";
  if (((s = getenv("LC_ALL")) && *s) ||
      ((s = getenv("LC_MEASUREMENT")) && *s) ||
      ((s = getenv("LANG")) && *s))
    if (strstr(s, "_US"))
      units = "inches";

  printf("Paper: %s\nUnits: %s\n", paper, units);

  return 0;
}

American users should (and with most distributions typically have) LANG=en_US
set (often also with LC_COLLATE=POSIX to prevent ls changing its sorting order),
so they will still get their special national 8.5x11" paper format configured
correctly, without disrupting Mozilla printing worldwide, as it happens at the
moment.

Another idea is to include in addition to "en-US" also a language setting "en"
to the default download version of Mozilla. "en" differs from "en-US" in that it
applies ISO standards for default settings instead of US customary values.

en-US: US Letter, inches, mm/dd/yy, am/pm
en: A4, mm, yyyy-mm-dd, 24-hour time

The default distribution shouldn't force users to use a locale setting (en_US)
that differs so dramatically from international standards.