Mailing List Archive

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

[tlug] So-called "locale" problems in Thunderbird

Brian Chandler writes:

 > I understand that I cannot expect to specify a date format,
 > but have to do some "locale" nonsense;

It's possible.  You just have to do something more indirect: define
your own locale.  You can even call it "brian", as far as I know.

The locale notation isn't nonsense, it's just intended to cater to the
minimal knowledge you can expect of users.  The idea is that people
probably know what language they speak and what country (or region)
they live in.  Two out of three isn't bad, you just have to get an
expert to tell you what encoding to use (which is probably determined
by the system anyway these days).  So if you speak ENglish and live in
the USa, your locale is en_US.something.  OTOH, most real people don't
speak strftime.  If you want to speak strftime, "just" define your own
locale and run localedef on it.

 > my general strategy, which seems to be quite standard,

It's widespread, but hardly standard, since it completely ignores the
facilities provided for exactly this kind of case.

 > Here's the response to command 'locale':

Quite messy.

Darren is right to say it's probably not what you want, and he
suggests update-locale.  However, all that does is edit
/etc/default/locale for you, and you still have to spell the locales
out and spell them correctlyly, so you might as well edit it yourself.


is all you need.  That will fix your thousands separator/decimal point
issue.  You might want

LC_MONETARY=ja_JP.UTF-8    # en_JP.UTF-8 probably works as well.

as well to get yen in your monetary fields in your spreadsheets.

 > How do I find out how to change these settings?

Use update-locale or edit /etc/default/locale directly.  That should
not only get this right in the shell but also in your X or Wayland

Given that Thunderbird has its own settings, /etc/default/locale may
be completely ignored, but I would hope not.  However, if you've done
any configuration in Thunderbird, that will probably override

 > (What the f could "regional" mean, other than a repetition of the
 > "locale" idiocy?)

Presumably it refers to the region setting of the locale, which is
divided into three parts: language_region.encoding.

Life is much easier if you just use Emacs. ;-)  Of course there's a
learning curve, but once you've learned it, it doesn't change.

 > Is there a better way? Like an operating system that uses text
 > configuration files, which you can find in the place the
 > documentation says they are, and allows you to select things like
 > date format?

You already have that OS in Linux.  The problem is Thunderbird.  I
prefer to have all my problems be the same.  That's why I use regexps
and Emacsen, but YMMV on those. ;-)

In Emacs, you have to learn how to make it do what you want, which
seems like a waste of time when you do it once and the setting lasts
for literally decades (the oldest stuff in my .xemacs/init.el got
ported from my .emacs which goes back to about 1987).  But compared to
the alternative (GUI products whose settings "file" format changes
from release to release), I don't think it's at all a bad tradeoff.
As I say, YMMV.

 > I'm sorry, this is awfully ranty, but this stuff seems to get worse
 > with every year of the endarkenment.

Of course it does.  Every year more people use Ubuntu and Thunderbird
and demand that it automatically do what they want.  So these projects
keep fiddling with their configuration facilities.  I'm surprised they
haven't figured this one out, though.  There are two variables,
language and region, each with pretty clear implications for the
various categories of locale setting, and a constant
(encoding=UTF-8).  Why the Thunderbird people decided it was a good
idea to call the language setting the "application" setting, I don't
understand at all.

 > Meanwhile I have some arcane questions about HTTP, and wonder if there 
 > are any experts here? For a taste, loading a page from the site 
 > into a browser (Firefox, Chromium, I have tried 
 > works, but "wget"; produces  ERROR 500: Internal 
 > Server Error. Is there any way this could genuinely be a server
 > error?

Sure.  Anything could be a server error, even returning the desired
content (hint, you're a black hat).

 > I mean, what magic does Firefox know about that makes the server
 > work?

It's not magic, it's very simple.  It just keeps trying variations on
the URL and options until it gets a reply.  My guess was that the
server wanted a slash at the end of the URL: Firefox will try the
exact URL and add a missing slash if the exact URL errors.  Furkan
found a more interesting answer: the server can't handle the
uncompressed truth (insert Jack Nicholson meme).  Firefox will try
compressed first, and fall back to uncompressed if that fails.  I'm
not sure what other exception handling a sophisticated browser does
but I wouldn't be surprised if there are a dozen such tricks.  OTOH,
curl and wget are "do what you said, no more and no less" command line

Normally I'd suggest RTFM'ing, but F me instead, the current set of
HTTP/HTTPS 1.1 standards now include at least 16 RFCs (7230-7240,
8615, and at least 3 earlier ones still at least partially current,
plus 3986 on URIs).  A textbook on HTTP is probably 350 pages by now,
assuming it even exists.  RFC 2616 probably gives a pretty good
overview (which is quite lacking in the 723x series which obsoletes
it, unlike email which has a whole "email architecture" series!)  The
full RFC is 176 pages though....

Home | Main Index | Thread Index