On tis, 2009-11-17 at 09:31 +0900, Itagaki Takahiro wrote:
> Peter Eisentraut <peter_e@gmx.net> wrote:
>
> > OK, I think the consensus here is:
> > - Eat BOM at beginning of file (as you implemented)
> > - Only when client encoding is UTF-8 --> please fix that
>
> Are they AND condition? If so, this patch will be useless.
> Please remember \encoding or SET client_encoding appear
> *after* BOM at beginning of file.
Presumably, if you have editors throwing in BOM marks without asking,
you have an environment where either
a) You can set the client encoding to UTF8 in the environment, so it
applies by default, or
b) The server encoding is UTF8, so the client encoding will default to
that.
Together, that should cover a lot of cases. Not perfect, but far from
useless.