Re: psql blows up on BOM character sequence

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql blows up on BOM character sequence
Date: 2014-03-23 15:03:19
Message-ID: 1395586999.9060.5.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2014-03-22 at 11:23 -0500, Jim Nasby wrote:
> On 3/21/14, 8:13 PM, David E. Wheeler wrote:
> > On Mar 21, 2014, at 2:16 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> >
> >> Surely if it were really a major annoyance, someone would have sent code to fix it during the last 4 years and more since the above.
> >>
> >> I suspect it's a minor annoyance :-)
> >>
> >> But by all means add it to the TODO list if it's not there already.
> >
> > I have cleaned up many a BOM added to files that made psql blow up. I think PGAdmin III was a culprit, though I’m not sure (I don’t use, it, cleaned up after coworkers who do).
>
> Yes, my coworker that figured out what the problem was said the culprit here is actually pgAdmin. :(

Just a quick comment on this. Yes, pgAdmin always added a BOM in every
SQL files it wrote. That being said, since 2010, pgAdmin has an option
that allows the user to request the BOM writing (IOW, it's disabled by
default for new installations of pgAdmin). See in the
preferences/options window, "Query tool / Query file" sub-item, and
"Write BOM for UTF files" checkbox. Make sure it's unchecked.

Either your coworker has an older release (that would be older than 1.14
IIRC), or he didn't change the setting to make it work like he would
like.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-03-23 15:49:37 Re: Useless "Replica Identity: NOTHING" noise from psql \d
Previous Message Petr Jelinek 2014-03-23 14:53:59 Re: Review: plpgsql.extra_warnings, plpgsql.extra_errors