Re: Postgresql and scripting

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Jerome Lyles <susemail(at)hawaii(dot)rr(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, suse-linux-e(at)suse(dot)com
Subject: Re: Postgresql and scripting
Date: 2004-09-08 01:56:02
Message-ID: 20040908015602.GB7556@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 07, 2004 at 01:33:08PM -1000, Jerome Lyles wrote:
> On Tuesday 07 September 2004 01:50 am, John DeSoi wrote:
> > On Sep 7, 2004, at 7:24 AM, Jerome Lyles wrote:
> > > test-# \i create.txt
> > > psql:create.txt:1: ERROR: syntax error at or near "" at character 1
> > >
> > > Here is the top of the script:
> > > ------------------------------------------------------------
> > > - - S a m s T e a c h Y o u r s e l f S Q L i n 1 0 M i
> > > n u t e
> >
> > It seems that your file might be in unicode (utf-16) since it appears
> > there is whitespace after every character. Check your editor settings
> > and resave the file.

> Right now it's in unicode (utf-8), switching between utf 8 and sixteen has no
> effect on the spaces between letters. Tried iso 8859-1 and iso 8859-15 but
> the editor window was empty for these encodings.

Did you try using recode?

recode utf16..iso8859-15 filename

Of course, just changing the encoding setting in the editor does not
automatically recode the file, does it?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Ni aun el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2004-09-08 02:02:58 Re: Restoring dump of multiuser databases
Previous Message Dennis Gearon 2004-09-08 01:09:22 Release of 8.0.0