Tom Lane wrote:
> What I personally wish we could do is eliminate database encoding as
> a separate setting altogether, and drive it off the locale selection.
> I don't know how to do that though.
The information is available:
$ LANG=de_DE locale charmap
ISO-8859-1
$ LANG=de_DE@euro locale charmap
ISO-8859-15
$ LANG=de_DE.utf8 locale charmap
UTF-8
But the answer space is infinite:
$ LANG=C locale charmap
ANSI_X3.4-1968
I suspect Japanese users will also have a problem with this mechanism,
but at least we could keep -E to override the automatic selection.