Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5A0661337B83; Sat, 4 Dec 2010 08:46:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 12426-01; Sat, 4 Dec 2010 12:46:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id E2B4513364DE; Sat, 4 Dec 2010 08:46:15 -0400 (AST) Received: from [192.168.10.2] (ASte-Genev-Bois-153-1-31-89.w83-112.abo.wanadoo.fr [83.112.77.89]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 9DD863B8F5; Sat, 4 Dec 2010 13:46:15 +0100 (CET) Message-ID: <4CFA3817.2020400@lelarge.info> Date: Sat, 04 Dec 2010 13:46:15 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Josh Berkus CC: Willy-Bas Loos , pgsql-admin@postgresql.org, pgadmin-support@postgresql.org Subject: Re: [ADMIN] syntax error for no apparent reason References: <4CF99D40.90306@agliodbs.com> In-Reply-To: <4CF99D40.90306@agliodbs.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201012/21 X-Sequence-Number: 10960 Le 04/12/2010 02:45, Josh Berkus a écrit : > >> I've encountered this before, psql gives me a syntax error for no clear >> reason. It's allways on the first character of a sql file. >> I think that there must be some strange character code at the first >> position, maybe it is because i share a ntfs partition with the windows >> installation on my laptop and move files around. > > Yeah, this is caused by pgadmin adding a unicode marker at the first > position of the file. If you uncheck "Read and Write Unicode UTF-8 > Files" in the preferences, this issue should go away. > It goes away because the file is no longer in UTF-8, and that may not be what the OP wants. I have a patch ready to be commited that will handle this. But you will need next pgAdmin's release. -- Guillaume http://www.postgresql.fr http://dalibo.com